omni/connect/core/Log.h
File members: omni/connect/core/Log.h
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
//
// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
// property and proprietary rights in and to this material, related
// documentation and any modifications thereto. Any use, reproduction,
// disclosure or distribution of this material and related documentation
// without an express license agreement from NVIDIA CORPORATION or
// its affiliates is strictly prohibited.
#pragma once
#include "Api.h"
#include <omni/log/ILog.h>
OMNI_LOG_DECLARE_CHANNEL(kConnectCoreChannel);
#if OMNICONNECTCORE_WITH_NUCLEUS
OMNI_LOG_DECLARE_CHANNEL(kClientLibraryChannel);
#endif // OMNICONNECTCORE_WITH_NUCLEUS
namespace omni::connect::core
{
OMNICONNECTCORE_API void startupLog();
OMNICONNECTCORE_API const char* logChannel();
typedef std::function<void(const char* channel, omni::log::Level level, const char* message)> ClientAppLogCallback;
OMNICONNECTCORE_API void addLogConsumer(const std::string& name, ClientAppLogCallback callback);
OMNICONNECTCORE_API void removeLogConsumer(const std::string& name);
OMNICONNECTCORE_API void enableStandardOutputStream(bool enabled);
} // namespace omni::connect::core