|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
10 #include "opentelemetry/logs/log_record.h"
11 #include "opentelemetry/logs/logger.h"
12 #include "opentelemetry/logs/noop.h"
13 #include "opentelemetry/nostd/string_view.h"
14 #include "opentelemetry/nostd/unique_ptr.h"
15 #include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
16 #include "opentelemetry/sdk/logs/logger_context.h"
17 #include "opentelemetry/version.h"
25 class Logger final :
public opentelemetry::logs::Logger
35 std::shared_ptr<LoggerContext>
context,
36 std::unique_ptr<instrumentationscope::InstrumentationScope> instrumentation_scope =
46 using opentelemetry::logs::Logger::EmitLogRecord;
64 std::string logger_name_;
68 std::unique_ptr<instrumentationscope::InstrumentationScope> instrumentation_scope_;
69 std::shared_ptr<LoggerContext> context_;
71 static opentelemetry::logs::NoopLogger kNoopLogger;
Logger(opentelemetry::nostd::string_view name, std::shared_ptr< LoggerContext > context, std::unique_ptr< instrumentationscope::InstrumentationScope > instrumentation_scope=instrumentationscope::InstrumentationScope::Create("")) noexcept
Initialize a new logger.
const opentelemetry::sdk::instrumentationscope::InstrumentationScope & GetInstrumentationLibrary() const noexcept
Provide a simplified port of std::unique_ptr that has ABI stability.
const opentelemetry::sdk::instrumentationscope::InstrumentationScope & GetInstrumentationScope() const noexcept
Returns the associated instrumentation scope.
#define OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
const opentelemetry::nostd::string_view GetName() noexcept override
Returns the name of this logger.
LoggerConfig defines various configurable aspects of a Logger's behavior.
nostd::unique_ptr< opentelemetry::logs::LogRecord > CreateLogRecord() noexcept override
void EmitLogRecord(nostd::unique_ptr< opentelemetry::logs::LogRecord > &&log_record) noexcept override
static nostd::unique_ptr< InstrumentationScope > Create(nostd::string_view name, nostd::string_view version="", nostd::string_view schema_url="", InstrumentationScopeAttributes &&attributes={})
Returns a newly created InstrumentationScope with the specified library name and version.
std::string_view string_view
#define OPENTELEMETRY_DEPRECATED_MESSAGE(msg)