Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
Default traits for Logger implementations. More...
#include <tomographer/tools/loggers.h>
Public Types | |
enum | |
Default traits for Logger implementations.
If you write your own logger class, you must also provide information about this class such as whether it is thread-safe by specializing the traits class, e.g.:
It's a good idea to inherit from DefaultLoggerTraits, so that if additional traits are added in the future, then your code will still compile.
anonymous enum |
Enumerator | |
---|---|
IsThreadSafe |
Whether a same logger instance may be called from different threads simultaneously. By default, loggers are not thread-safe. |
StaticMinimumSeverityLevel |
A statically-determined minimum severity logging level. The logger will automatically discard at compile-time any message with severity level strictly lesser than this level (regardless of the runtime level). Of course, the runtime level of the logger will be observed, but the runtime level cannot be set to a lower severity level than StaticMinimumSeverityLevel. If set to LOWEST_SEVERITY_LEVEL, no messages are discarded at compile-time, and all messages are processed at runtime. If set to -1, all messages are discarded (cf. VacuumLogger). |
HasOwnGetLevel |
Whether the logger class can provide its own run-time level. If set to 0 (the default), then the base logger stores the level given in the constructor and uses that as the logger's level. It also provides a level() method which returns the current level. Subclasses may set the level by calling the protected method LoggerBase::setLogLevel(). If set to 1, then any time the base logging engine needs to know the current logger's level, it will call the method level() on the derived logger object to obtain the current level. |
HasFilterByOrigin |
Whether the logger has a filter based on the given 'origin'. This flag may be set to either If filtering is activated, then before formatting and emitting messages the logging engine will test the logger object's |