Class Logger

Inheritance Relationships

Base Type

Class Documentation

class Logger : public opentelemetry::logs::Logger

Public Functions

explicit 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.

Parameters:
  • name – The name of this logger instance

  • context – The logger provider that owns this logger.

const opentelemetry::nostd::string_view GetName() noexcept override

Returns the name of this logger.

nostd::unique_ptr<opentelemetry::logs::LogRecord> CreateLogRecord() noexcept override
void EmitLogRecord(nostd::unique_ptr<opentelemetry::logs::LogRecord> &&log_record) noexcept override
const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationScope() const noexcept

Returns the associated instrumentation scope

inline const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationLibrary() const noexcept