#include <additionalloggerbase.h>
Public Member Functions | |
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 void | log (JournalLogLevel level, char const *file, int line, char const *function, std::string const &msg)=0 |
Write line to the log. More... | |
virtual | ~AbstractAdditionalLogger () |
Destructor. More... | |
Protected Member Functions | |
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... | |
Private Attributes | |
JournalLogLevel | m_debugLevel |
JournalLogLevel | m_level |
Convenient base class for custom additional loggers. Already implements functionality such as log level that should be common for all additional loggers Custom additional loggers can be derived from this
Definition at line 75 of file additionalloggerbase.h.
AdditionalLoggerBase::AdditionalLoggerBase | ( | JournalLogLevel | initialLogLevel = JLL_Alert | ) |
Constructs an AdditionalLoggerBase.
[in] | initialLogLevel | The initial log level to use as log level and debug log level |
Definition at line 70 of file additionalloggerbase.cpp.
|
overridevirtual |
Implements AbstractAdditionalLogger.
Definition at line 84 of file additionalloggerbase.cpp.
|
overridevirtual |
Implements AbstractAdditionalLogger.
Definition at line 77 of file additionalloggerbase.cpp.
|
overridevirtual |
[in] | level | The log level to check |
Implements AbstractAdditionalLogger.
Definition at line 133 of file additionalloggerbase.cpp.
|
overridevirtual |
Write line to the log without decoration (timestamp, thread)
[in] | level | The log level |
[in] | file | The name of the file from which the logging originates |
[in] | line | The line number from which the logging originates |
[in] | function | The name of the function from which the logging originates |
[in] | msg | The actual log message The AdditionalLoggerBase simply forwards this call to the normal log method but this method can be overridden in derived classes |
Implements AbstractAdditionalLogger.
Definition at line 141 of file additionalloggerbase.cpp.
|
protectedvirtual |
Called when the debug log level changes This can be overridden in derived classes.
Definition at line 125 of file additionalloggerbase.cpp.
|
protectedvirtual |
Called when the log level changes This can be overridden in derived classes.
Definition at line 116 of file additionalloggerbase.cpp.
|
overridevirtual |
Set the current debug log level.
[in] | level | The new debug log level |
Implements AbstractAdditionalLogger.
Definition at line 103 of file additionalloggerbase.cpp.
|
overridevirtual |
Set the current log level.
[in] | level | The new log level |
Implements AbstractAdditionalLogger.
Definition at line 91 of file additionalloggerbase.cpp.
|
private |
Definition at line 95 of file additionalloggerbase.h.
|
private |
Definition at line 94 of file additionalloggerbase.h.