ocssw
V2022
|
#include <Log.hpp>
Public Member Functions | |
Log () | |
Log (bool default_loggers) | |
void | add (std::unique_ptr< LogFacility > target) |
void | add (int min_severity, std::unique_ptr< LogFacility > target) |
void | add (int min_severity, int max_severity, std::unique_ptr< LogFacility > target) |
void | log_raw (int severity, const std::string &s) |
void | log (int severity, const std::string &s) |
template<typename... Arguments> | |
void | log (int severity, const std::string &fmt, const Arguments &... args) |
void | log (LogSeverity severity, const std::string &s) |
template<typename... Arguments> | |
void | log (LogSeverity severity, const std::string &fmt, const Arguments &... args) |
void | add (LogSeverity min_severity, std::unique_ptr< LogFacility > target) |
void | add (LogSeverity min_severity, LogSeverity max_severity, std::unique_ptr< LogFacility > target) |
void | log_raw (LogSeverity severity, const std::string &s) |
void | debug (const std::string &s) |
template<typename... Arguments> | |
void | debug (const std::string &s, const Arguments &... args) |
void | info (const std::string &s) |
template<typename... Arguments> | |
void | info (const std::string &s, const Arguments &... args) |
void | notice (const std::string &s) |
template<typename... Arguments> | |
void | notice (const std::string &s, const Arguments &... args) |
void | warning (const std::string &s) |
template<typename... Arguments> | |
void | warning (const std::string &s, const Arguments &... args) |
void | error (const std::string &s) |
template<typename... Arguments> | |
void | error (const std::string &s, const Arguments &... args) |
void | critical (const std::string &s) |
template<typename... Arguments> | |
void | critical (const std::string &s, const Arguments &... args) |
void | alert (const std::string &s) |
template<typename... Arguments> | |
void | alert (const std::string &s, const Arguments &... args) |
void | emergency (const std::string &s) |
template<typename... Arguments> | |
void | emergency (const std::string &s, const Arguments &... args) |
void | warn (const std::string &s) |
template<typename... Arguments> | |
void | warn (const std::string &s, const Arguments &... args) |
void | err (const std::string &s) |
template<typename... Arguments> | |
void | err (const std::string &s, const Arguments &... args) |
void | crit (const std::string &s) |
template<typename... Arguments> | |
void | crit (const std::string &s, const Arguments &... args) |
void | emerg (const std::string &s) |
template<typename... Arguments> | |
void | emerg (const std::string &s, const Arguments &... args) |
size_t | num_loggers () |
LogSeverity | severity () |
Static Public Member Functions | |
static Log & | get_default () |
Friends | |
Log & | operator<< (Log &me, LogSeverity severity) |
Log & | operator<< (Log &me, const std::string &t) |
template<typename T > | |
Log & | operator<< (Log &me, const T &t) |
Detailed Description
Multiple output, versatile logger.
NB: log severities are backwards; e.g., debug is numerically larger than emergency, but is considered lower severity. Thus, min_severity and max_severity throughout are referring to severity, not numeric representation, which were copied from syslog's paradigm.
Example
Constructor & Destructor Documentation
◆ Log() [1/2]
|
inline |
◆ Log() [2/2]
Member Function Documentation
◆ add() [1/5]
|
inline |
◆ add() [2/5]
|
inline |
◆ add() [3/5]
|
inline |
◆ add() [4/5]
|
inline |
◆ add() [5/5]
|
inline |
◆ alert() [1/2]
|
inline |
◆ alert() [2/2]
|
inline |
◆ crit() [1/2]
|
inline |
◆ crit() [2/2]
|
inline |
◆ critical() [1/2]
|
inline |
◆ critical() [2/2]
|
inline |
◆ debug() [1/2]
|
inline |
◆ debug() [2/2]
|
inline |
◆ emerg() [1/2]
|
inline |
◆ emerg() [2/2]
|
inline |
◆ emergency() [1/2]
|
inline |
◆ emergency() [2/2]
|
inline |
◆ err() [1/2]
|
inline |
◆ err() [2/2]
|
inline |
◆ error() [1/2]
|
inline |
◆ error() [2/2]
|
inline |
◆ get_default()
|
inlinestatic |
◆ info() [1/2]
|
inline |
◆ info() [2/2]
|
inline |
◆ log() [1/4]
|
inline |
Log a message with a given (numeric) severity, performing i18n in the process.
TODO: don't call boost::format if no loggers will use this message (lower cost for oft-hidden debug messages)
- Template Parameters
-
Arguments arbitrary argument types
- Parameters
-
severity numeric severity of message fmt boost::format string args format parameters
◆ log() [2/4]
|
inline |
◆ log() [3/4]
|
inline |
◆ log() [4/4]
|
inline |
◆ log_raw() [1/2]
|
inline |
◆ log_raw() [2/2]
|
inline |
◆ notice() [1/2]
|
inline |
◆ notice() [2/2]
|
inline |
◆ num_loggers()
|
inline |
◆ severity()
|
inline |
◆ warn() [1/2]
|
inline |
◆ warn() [2/2]
|
inline |
◆ warning() [1/2]
|
inline |
◆ warning() [2/2]
|
inline |
Friends And Related Function Documentation
◆ operator<< [1/3]
|
friend |
◆ operator<< [2/3]
log a non-string object via stream operator, using default log severity
This function will use a standard stringbuf and ostream to convert the input to a string. The stream operators do not provide i18n.
- Parameters
-
me this logger t non-string object to log
- Returns
- this logger, for chaining
◆ operator<< [3/3]
|
friend |
The documentation for this class was generated from the following file:
- /gfs-oceanweb/web/ocssw/ocssw_src/include/focs/Log.hpp