The namespace 'log' contains routines for interacting with the message logger. More...
Classes | |
struct | LoggerManipulator |
Typedefs | |
typedef Level | Priority |
typedef Level | Severity |
typedef Level | Verbosity |
Enumerations | |
enum | Level { LEVEL_QUIET = 60 , LEVEL_CRITICAL = 50 , LEVEL_ERROR = 40 , LEVEL_WARNING = 30 , LEVEL_INFO = 20 , LEVEL_DEBUG = 10 , LEVEL_NOTSET = 0 , QUIET = LEVEL_QUIET , NORMAL = LEVEL_INFO , DEBUG = LEVEL_DEBUG } |
enum | Mode { MODE_UNDEFINED = -1 , MODE_SEPARATE = 0 , MODE_COMBINE , COMBINED = MODE_COMBINE , SEPARATE = MODE_SEPARATE } |
enum | Visibility { VISIBILITY_NOTSET = -1 , VISIBILITY_MASTER = 0 , VISIBILITY_GLOBAL , MASTER = VISIBILITY_MASTER , GLOBAL = VISIBILITY_GLOBAL } |
The namespace 'log' contains routines for interacting with the message logger.
Defines the priority levels that can be associated with a line. The usage of this enum is deprecated as it as been superseded by Severity.
Definition at line 78 of file logger.hpp.
Defines the severity levels that can be associated with a line. Severity is defined as a typedef of Level.
Definition at line 77 of file logger.hpp.
Defines the verbosity levels that can be associated with a logger. The usage of this enum is deprecated as it as been superseded by Level.
Definition at line 79 of file logger.hpp.
enum bitpit::log::Level |
Define the logging levels.
Definition at line 56 of file logger.hpp.
enum bitpit::log::Mode |
Defines the operational mode of the logger manager.
Enumerator | |
---|---|
COMBINED | In this mode all the loggers will write the messages on the same file. |
SEPARATE | In this mode each logger will write the messages on its own file. |
Definition at line 48 of file logger.hpp.
enum bitpit::log::Visibility |
Definition at line 69 of file logger.hpp.
LoggerManipulator< log::Level > bitpit::log::consoleVerbosity | ( | const log::Level & | threshold | ) |
Returns a logger manipulator that allows to change the verbosity threshold for the messages printed on the console.
threshold | is the verbosity threshold |
Definition at line 2093 of file logger.cpp.
LoggerManipulator< std::string > bitpit::log::context | ( | const std::string & | context | ) |
Returns a logger manipulator that allows to change the context of the output.
context | is the context of the output |
Definition at line 1929 of file logger.cpp.
Logger & bitpit::log::cout | ( | const std::string & | name, |
log::Level | defaultSeverity, | ||
log::Visibility | defaultVisibility ) |
Returns an instance of the specified logger.
The default severity of the messages will be set to the specified level, if no default severity is specified, the default severity will remain unaltered.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
name | is the name of the logger |
defaultSeverity | is the default severity of the messages. |
defaultVisibility | is the default visibility of the messages |
Definition at line 1726 of file logger.cpp.
Logger & bitpit::log::cout | ( | log::Level | defaultSeverity, |
log::Visibility | defaultVisibility ) |
Returns an instance of the default logger.
The default severity of the messages will be set to the specified level, if no default severity is specified, the default severity will remain unaltered.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
defaultSeverity | is the default severity of the messages. |
defaultVisibility | is the default visibility of the messages. |
Definition at line 1705 of file logger.cpp.
Logger & bitpit::log::critical | ( | const std::string & | name, |
log::Visibility | defaultVisibility ) |
Returns an instance of the specified logger.
The default severity of the messages will be set to the CRITICAL level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
name | is the name of the logger |
defaultVisibility | is the default visibility of the messages |
Definition at line 1760 of file logger.cpp.
Logger & bitpit::log::critical | ( | log::Visibility | defaultVisibility | ) |
Returns an instance of the default logger.
The default severity of the messages will be set to the CRITICAL level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
Definition at line 1742 of file logger.cpp.
Logger & bitpit::log::debug | ( | const std::string & | name, |
log::Visibility | defaultVisibility ) |
Returns an instance of the specified logger.
The default severity of the messages will be set to the DEBUG level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
name | is the name of the logger |
defaultVisibility | is the default visibility of the messages |
Definition at line 1900 of file logger.cpp.
Logger & bitpit::log::debug | ( | log::Visibility | defaultVisibility | ) |
Returns an instance of the default logger.
The default severity of the messages will be set to the DEBUG level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
defaultVisibility | is the default visibility of the messages |
Definition at line 1882 of file logger.cpp.
LoggerManipulator< log::Level > bitpit::log::defaultSeverity | ( | const log::Level & | severity | ) |
Returns a logger manipulator that allows to change the default severity of the messages.
severity | is the default severity of the messages |
Definition at line 1956 of file logger.cpp.
LoggerManipulator< log::Visibility > bitpit::log::defaultVisibility | ( | const log::Visibility & | visibility | ) |
Returns a logger manipulator that allows to change the default visibility of the messages.
visibility | is the default visibility of the messages |
Definition at line 2010 of file logger.cpp.
LoggerManipulator< log::Level > bitpit::log::disable | ( | const log::Level & | level | ) |
Returns a logger manipulator that allows to define an overriding verbosity level which takes precedence over the logger’s own level. The effect of this overriding verbosity level is to disable all logging calls of severity level and below.
level | is the overriding verbosity level |
Definition at line 2151 of file logger.cpp.
Logger & bitpit::log::disable | ( | Logger & | logger, |
const log::Level & | level ) |
Provides an overriding verbosity level which takes precedence over the logger’s own level. Its effect is to disable all logging calls of severity level and below.
logger | is a reference pointing to the logger |
level | is the overriding verbosity level |
Definition at line 2134 of file logger.cpp.
LoggerManipulator< log::Level > bitpit::log::disableConsole | ( | const log::Level & | level | ) |
Returns a logger manipulator that allows to define an overriding verbosity level which takes precedence over the logger’s own console level. The effect of this overriding verbosity level is to disable all logging calls of severity level and below.
level | is the overriding verbosity level |
Definition at line 2182 of file logger.cpp.
Logger & bitpit::log::disableConsole | ( | Logger & | logger, |
const log::Level & | level ) |
Provides an overriding verbosity level which takes precedence over the logger’s own console level. Its effect is to disable all logging calls of severity level and below.
logger | is a reference pointing to the logger |
level | is the overriding verbosity level |
Definition at line 2165 of file logger.cpp.
LoggerManipulator< log::Level > bitpit::log::disableFile | ( | const log::Level & | level | ) |
Returns a logger manipulator that allows to define an overriding verbosity level which takes precedence over the logger’s own file level. The effect of this overriding verbosity level is to disable all logging calls of severity level and below.
level | is the overriding verbosity level |
Definition at line 2213 of file logger.cpp.
Logger & bitpit::log::disableFile | ( | Logger & | logger, |
const log::Level & | level ) |
Provides an overriding verbosity level which takes precedence over the logger’s own file level. Its effect is to disable all logging calls of severity level and below.
logger | is a reference pointing to the logger |
level | is the overriding verbosity level |
Definition at line 2196 of file logger.cpp.
Logger & bitpit::log::error | ( | const std::string & | name, |
log::Visibility | defaultVisibility ) |
Returns an instance of the specified logger.
The default severity of the messages will be set to the ERROR level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
name | is the name of the logger |
defaultVisibility | is the default visibility of the messages |
Definition at line 1795 of file logger.cpp.
Logger & bitpit::log::error | ( | log::Visibility | defaultVisibility | ) |
Returns an instance of the default logger.
The default severity of the messages will be set to the ERROR level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
defaultVisibility | is the default visibility of the messages |
Definition at line 1777 of file logger.cpp.
LoggerManipulator< log::Level > bitpit::log::fileVerbosity | ( | const log::Level & | threshold | ) |
Returns a logger manipulator that allows to change the verbosity threshold for the messages printed on the file.
threshold | is the verbosity threshold |
Definition at line 2120 of file logger.cpp.
LoggerManipulator< int > bitpit::log::indent | ( | int | delta | ) |
Returns a logger manipulator that allows to set the indentation level of the messages.
delta | is the relative indentation level |
Definition at line 2240 of file logger.cpp.
Logger & bitpit::log::info | ( | const std::string & | name, |
log::Visibility | defaultVisibility ) |
Returns an instance of the specified logger.
The default severity of the messages will be set to the INFO level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
name | is the name of the logger |
defaultVisibility | is the default visibility of the messages |
Definition at line 1865 of file logger.cpp.
Logger & bitpit::log::info | ( | log::Visibility | defaultVisibility | ) |
Returns an instance of the default logger.
The default severity of the messages will be set to the INFO level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
defaultVisibility | is the default visibility of the messages |
Definition at line 1847 of file logger.cpp.
LoggerManager & bitpit::log::manager | ( | ) |
Logger & bitpit::log::operator<< | ( | Logger & | logger, |
LoggerManipulator< T > && | m ) |
Applies a manipulator to a logger.
Definition at line 367 of file logger.hpp.
LoggerManipulator< log::Level > bitpit::log::priority | ( | const log::Priority & | priority | ) |
Returns a logger manipulator that allows to change the priority of the output.
priority | is the priority of the output |
Definition at line 1983 of file logger.cpp.
Logger & bitpit::log::setConsoleVerbosity | ( | Logger & | logger, |
const log::Level & | threshold ) |
Sets the verbosity threshold for the messages printed on the console.
logger | is a reference pointing to the logger |
threshold | is the verbosity threshold |
Definition at line 2078 of file logger.cpp.
Set the context of the output for the specified logger.
logger | is a reference pointing to the logger |
context | is the context of the output |
Definition at line 1914 of file logger.cpp.
Logger & bitpit::log::setDefaultSeverity | ( | Logger & | logger, |
const log::Level & | severity ) |
Set the default severity of the messageg for the specified logger.
logger | is a reference pointing to the logger |
severity | is the default severity of the messages |
Definition at line 1941 of file logger.cpp.
Set the default visibility of the messages.
logger | is a reference pointing to the logger |
visibility | is the default visibility of the messages |
Definition at line 1995 of file logger.cpp.
Logger & bitpit::log::setFileVerbosity | ( | Logger & | logger, |
const log::Level & | threshold ) |
Sets the verbosity threshold for the messages printed on the file.
logger | is a reference pointing to the logger |
threshold | is the verbosity threshold |
Definition at line 2105 of file logger.cpp.
Sets the indentation level of the messages.
logger | is a reference pointing to the logger |
delta | is the relative indentation level |
Definition at line 2225 of file logger.cpp.
Logger & bitpit::log::setPriority | ( | Logger & | logger, |
const log::Priority & | priority ) |
Set the priority of the output for the specified logger.
logger | is a reference pointing to the logger |
priority | is the priority of the output |
Definition at line 1968 of file logger.cpp.
Logger & bitpit::log::setVerbosities | ( | Logger & | logger, |
const log::Level & | threshold ) |
Sets the verbosity thresholds for the messages printed both on the console and on the log file.
logger | is a reference pointing to the logger |
threshold | is the verbosity threshold |
Definition at line 2050 of file logger.cpp.
Set the visibility of the messages.
logger | is a reference pointing to the logger |
visibility | is the visibility of the messages |
Definition at line 2022 of file logger.cpp.
LoggerManipulator< log::Level > bitpit::log::verbosities | ( | const log::Level & | threshold | ) |
Returns a logger manipulator that allows to change the verbosity threshold for the messages printed both on the console and on the log file.
threshold | is the verbosity threshold |
Definition at line 2066 of file logger.cpp.
LoggerManipulator< log::Visibility > bitpit::log::visibility | ( | const log::Visibility & | visibility | ) |
Returns a logger manipulator that allows to change the visibility of the messages.
visibility | is the visibility of the messages |
Definition at line 2037 of file logger.cpp.
Logger & bitpit::log::warning | ( | const std::string & | name, |
log::Visibility | defaultVisibility ) |
Returns an instance of the specified logger.
The default severity of the messages will be set to the WARNING level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
name | is the name of the logger |
defaultVisibility | is the default visibility of the messages |
Definition at line 1830 of file logger.cpp.
Logger & bitpit::log::warning | ( | log::Visibility | defaultVisibility | ) |
Returns an instance of the default logger.
The default severity of the messages will be set to the WARNING level.
The default visibility of the messages will be set to the specified level, if no default visibility is specified, the default visibility will remain unaltered.
defaultVisibility | is the default visibility of the messages |
Definition at line 1812 of file logger.cpp.