9.1. Module Structure¶
The logging module provides the following classes:
Logis the core class of the logging module. This singleton is not only in charge of the logging operations (see Logging Messages), but it also provides configuration APIs to set different logging configuration aspects (see Module Configuration), as well as logging filtering at various levels (see Filters). It contains zero or more
LogConsumerobjects. The singleton’s consuming thread feeds the log entries added to the logging queue using the macros defined in Logging Messages to the log consumers sequentially (see Logging Thread).
LogConsumer. It defines how to consume log entries for outputting to an
std::ostreamobject. It includes a member function that derived classes must overload to define the desired
OStreamConsumer. It defines a
Log::Kindthreshold so that if the
Log::Kindis equal to or more severe than the selected threshold, the output defined will be STDERR. Otherwise, it defines STDOUT as the output (see StdoutErrConsumer).