Log Global Variables
Because we wish the Logger to be accessible anywhere, with minimal ‘passing’ of settings and configurations, we place the LoggerCore object inside a globally accessible namespace: GlobalLog.
Several other global variables also exist within this namespace.
Other Members
-
ConfigObject GlobalLog::Config
The global ConfigObject used by LOG and LoggerCore to determine what messages are printed, and any associated formatting.
-
std::mutex GlobalLog::StreamMutex
Used to prevent log-interleaving, and make the LOG (mostly) thread-safe.
-
std::vector<size_t> GlobalLog::PreviousLines
A tracker of the number of lines printed since each type of LogLevel. Used for LoggerCore::ErasePrevious()