A class that is used to log messages to the console. More...
#include <consolelogger.h>
Public Member Functions | |
ConsoleLogger (JournalLogLevel logLevel, JournalLogLevel errLevel) | |
Constructs a ConsoleLogger. More... | |
void | log (JournalLogLevel level, char const *file, int line, char const *function, std::string const &msg) override |
Write a log line to the console. More... | |
![]() | |
AdditionalLoggerBase (JournalLogLevel initialLogLevel=JLL_Alert) | |
Constructs an AdditionalLoggerBase. More... | |
JournalLogLevel | debugLevel () const override |
JournalLogLevel | logLevel () const override |
bool | logLevel (JournalLogLevel level) const override |
void | logNoDecoration (JournalLogLevel level, char const *file, int line, char const *function, std::string const &msg) override |
Write line to the log without decoration (timestamp, thread) More... | |
void | setDebugLevel (JournalLogLevel level) override |
Set the current debug log level. More... | |
void | setLogLevel (JournalLogLevel level) override |
Set the current log level. More... | |
![]() | |
virtual | ~AbstractAdditionalLogger () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
virtual void | onDebugLevelChanged (JournalLogLevel newLevel, JournalLogLevel oldLevel) |
Called when the debug log level changes This can be overridden in derived classes. More... | |
virtual void | onLogLevelChanged (JournalLogLevel newLevel, JournalLogLevel oldLevel) |
Called when the log level changes This can be overridden in derived classes. More... | |
A class that is used to log messages to the console.
Definition at line 70 of file consolelogger.h.
ConsoleLogger::ConsoleLogger | ( | JournalLogLevel | logLevel, |
JournalLogLevel | errLevel | ||
) |
Constructs a ConsoleLogger.
[in] | logLevel | The initial log level to use as log level for console logging (std out) |
[in] | errLevel | The initial log level to use as log level for error logging (std err) |
Definition at line 76 of file consolelogger.cpp.
|
overridevirtual |
Write a log line to the console.
[in] | level | The log level |
[in] | file | The name of the file from which the logging originates (not used) |
[in] | line | The line number from which the logging originates (not used) |
[in] | function | The name of the function from which the logging originates |
[in] | msg | The actual log message |
Implements AbstractAdditionalLogger.
Definition at line 89 of file consolelogger.cpp.