26 #include <olp/core/CoreApi.h>
27 #include <olp/core/logging/Appender.h>
28 #include <olp/core/logging/MessageFormatter.h>
60 return appender &&
static_cast<int>(level) >=
static_cast<int>(logLevel);
82 inline bool isValid()
const;
91 std::shared_ptr<IAppender> appender,
92 logging::Level level = logging::Level::Trace);
113 std::shared_ptr<IAppender> appender, logging::Level level) {
116 m_appenders.emplace_back(std::move(appenderWithLogLevel));
Configures appenders and loggers available in the logging system.
Definition: Configuration.h:36
std::vector< AppenderWithLogLevel > AppenderList
A typedef for a list of appenders.
Definition: Configuration.h:67
static Configuration createDefault()
Creates a default configuration by adding an instance of DebugAppender and ConsoleAppender as appende...
const AppenderList & getAppenders() const
Gets the appenders from the configuration.
Definition: Configuration.h:126
Configuration & addAppender(std::shared_ptr< IAppender > appender, logging::Level level=logging::Level::Trace)
Adds the appender along with its log level to the configuration.
Definition: Configuration.h:112
bool isValid() const
Checks whether the configuration is valid.
Definition: Configuration.h:110
Configuration & clear()
Clears the list of appenders.
Definition: Configuration.h:121
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24
Contains an appender and its log level.
Definition: Configuration.h:41
std::shared_ptr< IAppender > appender
The appender.
Definition: Configuration.h:52
logging::Level logLevel
The log level of the appender.
Definition: Configuration.h:47
bool isEnabled(logging::Level level) const
Checks whether the appender is enabled for the log level.
Definition: Configuration.h:59