controls the logging facility More...
#include <logging.hpp>
Static Public Member Functions | |
static void | addLogger (Logger &logger) |
register a new logger More... | |
static void | setLevel (const std::string &moduleName, LogLevel level) |
set severity level More... | |
static void | setLevel (const std::string &config) |
set severity levels with a config string More... | |
static void | setDestination (shared_ptr< std::ostream > os) |
set log destination More... | |
static void | setDestination (std::ostream &os) |
set log destination More... | |
static void | flush () |
flush log backend More... | |
controls the logging facility
Definition at line 46 of file logging.hpp.
|
inlinestatic |
register a new logger
NDN_LOG_INIT
macro. Definition at line 158 of file logging.hpp.
|
inlinestatic |
flush log backend
This ensures log messages are written to the destination stream.
Definition at line 182 of file logging.hpp.
|
inlinestatic |
set log destination
os | a stream for log output |
Initial destination is std::clog
.
Definition at line 176 of file logging.hpp.
|
static |
set log destination
os | a stream for log output; caller must ensure this is valid until setDestination is invoked again or program exits |
This is equivalent to setDestination(shared_ptr<std::ostream>(&os, nullDeleter))
Definition at line 167 of file logging.cpp.
|
inlinestatic |
set severity level
moduleName | logger name, or "*" for default level |
level | minimum severity level |
Log messages are output only if its severity is greater than the set minimum severity level. Initial default severity level is LogLevel::NONE
which enables FATAL only.
Changing the default level overwrites individual settings.
Definition at line 164 of file logging.hpp.
|
inlinestatic |
set severity levels with a config string
config | colon-separate key=value pairs |
std::invalid_argument | config string is malformed |
is equivalent to
Definition at line 170 of file logging.hpp.