Class LoggerProvider

Inheritance Relationships

Derived Types

Class Documentation

class LoggerProvider

Creates new Logger instances.

Subclassed by opentelemetry::logs::NoopLoggerProvider, opentelemetry::sdk::logs::LoggerProvider

Public Functions

virtual ~LoggerProvider() = default
virtual nostd::shared_ptr<Logger> GetLogger(nostd::string_view logger_name, nostd::string_view library_name = "", nostd::string_view library_version = "", nostd::string_view schema_url = "", const common::KeyValueIterable &attributes = common::NoopKeyValueIterable()) = 0

Gets or creates a named Logger instance.

Optionally a version can be passed to create a named and versioned Logger instance.

Optionally a configuration file name can be passed to create a configuration for the Logger instance.

inline nostd::shared_ptr<Logger> GetLogger(nostd::string_view logger_name, nostd::string_view library_name, nostd::string_view library_version, nostd::string_view schema_url, std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes)
template<class T, nostd::enable_if_t<common::detail::is_key_value_iterable<T>::value>* = nullptr>
inline nostd::shared_ptr<Logger> GetLogger(nostd::string_view logger_name, nostd::string_view library_name, nostd::string_view library_version, nostd::string_view schema_url, const T &attributes)