Logging¶
-
group
logging
Logging is a light, multi-level, compile-time-filterable, logging framework that is similar to glog in output format.
It defines two logging macros, one for conventional logging and the other for verbose logging. Compile time filtering is applied separately to each of the two.
Output format:
LMMDD HH:MM:SS.uuuuuu tid filename:##] Log message ...
Where:
Output example: I0206 10:42:21.047293 87072 Logging.h:15 foo bar n=42 Note that FL_LOG(level) only prints when level is <= from value set to Logging::setMaxLoggingLevel(level)L: Log level {Fatal, Critical, Error, Warning, Info} MMDD: month, day HH:MM:SS.uuuuuu: time (24-hour format) with micro-seconds tid: thread ID filename:## the basename of the source file and line number of the FL_LOG message FL_LOG use examples: \code FL_LOG(INFO) << "foo bar n=" << 42;
FL_VLOG use example:
Output example:FL_VLOG(1) << "foo bar n=" << 42;
Note that FL_VLOG(level) only prints when level is <= from value set tovlog(1)0206 10:42:21.005439 87072 Logging.h:23 foo bar n=42
VerboseLogging::setMaxLoggingLevel(level)
Gives output:
vlog(1) 0206 10:42:21.005439 87072 Logging.h:23 foo bar n=42
Note that
VLOG(level)
only prints when level is less than or equal to the value set toVerboseLogging
Defines
-
FL_LOG
(level)¶ Write to log output for a given
LogLevel
.
-
FL_VLOG
(level)¶ Write to verbose log output for a given verbose logging level.
-
FL_LOG_IF
(level, exp)¶
-
FL_VLOG_IF
(level, exp)¶
Functions
Variables
-
constexpr LogLevel
DEFAULT_MAX_FL_LOGGING_LEVEL
= LogLevel::INFO¶ Used to globally limit
FL_LOG(level)
.
-