nidas v1.2.3
|
Functions | |
static void | nidas::util::Logger::setScheme (const std::string &name) |
Set the current scheme. | |
static void | nidas::util::Logger::setScheme (const LogScheme &scheme) |
Set the current scheme to the given scheme . | |
static void | nidas::util::Logger::updateScheme (const LogScheme &scheme) |
Update or insert this scheme in the collection of log schemes. | |
static LogScheme | nidas::util::Logger::getScheme (const std::string &name) |
Get the scheme with the given name . | |
static LogScheme | nidas::util::Logger::getScheme () |
Return the current LogScheme, creating the default LogScheme if it has not been set yet. | |
static bool | nidas::util::Logger::knownScheme (const std::string &name) |
Return true if the scheme with the given name is known, false otherwise. | |
static void | nidas::util::Logger::clearSchemes () |
Erase all known schemes and reset the active scheme to the name initialized at application start. | |
The Logging facility can store multiple logging configuration schemes, each with a particular name. The Logger class provides static methods to update the schemes and switch the active scheme. At any time the logging configuration can switch schemes by calling setScheme(). The first time a new scheme name is referenced, a default LogScheme is created with that name. A default LogScheme contains a single LogConfig to enable all messages with level LOGGER_WARNING and above. This is different than the empty LogScheme created by the default LogScheme constructor. If no LogScheme is set by an application, then a default LogScheme is used, with an empty name.
|
static |
Erase all known schemes and reset the active scheme to the name initialized at application start.
References current_scheme, get_scheme(), log_points, log_schemes, and nidas::util::LoggerPrivate::reconfig().
|
static |
Return the current LogScheme, creating the default LogScheme if it has not been set yet.
References current_scheme.
Referenced by nidas::dynld::GPS_NMEA_Serial::GPS_NMEA_Serial(), parseRunstring(), stats_log_variable(), and nidas::dynld::iss::TiltSensor::TiltSensor().
|
static |
Get the scheme with the given name
.
If the name does not exist, a default scheme is created, added to the known schemes, then returned. There is no default for name
, pass an empty string to lookup a scheme with an empty name. See getScheme().
References get_scheme().
|
static |
Return true if the scheme with the given name is known, false otherwise.
Applications can use this to create a specific default scheme by name if it has not been setup yet. This does not change the current scheme, and it does not create a scheme if the name does not exist yet. There is no default for name
. Pass an empty string to lookup a scheme with an empty name.
References lookup_scheme().
|
static |
Set the current scheme to the given scheme
.
The scheme is first added with updateScheme(), then it becomes the current scheme.
References current_scheme, log_points, log_schemes, and nidas::util::LoggerPrivate::reconfig().
|
static |
Set the current scheme.
If a scheme named name
does not exist and name
is non-empty, a default scheme is created with this name. The name can be empty, and like for any other name, the set scheme will replace any existing scheme with that name.
References current_scheme, get_scheme(), log_points, and nidas::util::LoggerPrivate::reconfig().
Referenced by main(), and parseRunstring().
|
static |
Update or insert this scheme in the collection of log schemes.
If a scheme already exists with the same name, this scheme will replace it. If the given scheme has the same name as the current scheme, then all the log points will be reconfigured according to the new scheme.
References current_scheme, log_points, log_schemes, and nidas::util::LoggerPrivate::reconfig().