|
log4tango 4.0.3
|
#include <Logger.hh>
Public Member Functions | |
| Logger (const std::string &name, Level::Value level=Level::OFF) | |
| Constructor. | |
| virtual | ~Logger () |
| Destructor. | |
| const std::string & | get_name () const |
| Return the logger name. | |
| void | set_level (Level::Value level) |
| Set the level of this Logger (silently ignores invalid values) | |
| Level::Value | get_level () const |
| Returns the assigned Level, if any, for this Logger. | |
| bool | is_level_enabled (Level::Value level) const |
| Returns true if the level of the Logger is equal to or higher than given level. | |
| void | log (Level::Value level, const char *string_format,...) |
| Log a message with the specified level. | |
| void | log (Level::Value level, const std::string &message) |
| Log a message with the specified level. | |
| void | log_unconditionally (Level::Value level, const char *string_format,...) |
| Log a message with the specified level without level checking. | |
| void | log_unconditionally (Level::Value level, const std::string &message) |
| Log a message with the specified level without level checking. | |
| void | debug (const char *string_format,...) |
| Log a message with debug level. | |
| void | debug (const std::string &message) |
| Log a message with debug level. | |
| bool | is_debug_enabled (void) const |
| Return true if the Logger will log messages with level DEBUG. | |
| LoggerStream | debug_stream (void) |
| Return a LoggerStream with level DEBUG. | |
| void | info (const char *string_format,...) |
| Log a message with info level. | |
| void | info (const std::string &message) |
| Log a message with info level. | |
| bool | is_info_enabled (void) const |
| Return true if the Logger will log messages with level INFO. | |
| LoggerStream | info_stream (void) |
| Return a LoggerStream with level INFO. | |
| void | warn (const char *string_format,...) |
| Log a message with warn level. | |
| void | warn (const std::string &message) |
| Log a message with warn level. | |
| bool | is_warn_enabled (void) const |
| Return true if the Logger will log messages with level WARN. | |
| LoggerStream | warn_stream (void) |
| Return a LoggerStream with level WARN. | |
| void | error (const char *string_format,...) |
| Log a message with error level. | |
| void | error (const std::string &message) |
| Log a message with error level. | |
| bool | is_error_enabled (void) const |
| Return true if the Logger will log messages with level ERROR. | |
| LoggerStream | error_stream (void) |
| Return a LoggerStream with level ERROR. | |
| void | fatal (const char *string_format,...) |
| Log a message with fatal level. | |
| void | fatal (const std::string &message) |
| Log a message with fatal level. | |
| bool | is_fatal_enabled (void) const |
| Return true if the Logger will log messages with level FATAL. | |
| LoggerStream | fatal_stream (void) |
| Return a LoggerStream with level FATAL. | |
| LoggerStream | get_stream (Level::Value level, bool filter=true) |
| Return a LoggerStream with given Level. | |
Protected Member Functions | |
| void | call_appenders (const LoggingEvent &event) |
| Call the appenders. | |
| log4tango::Logger::Logger | ( | const std::string & | name, |
| Level::Value | level = Level::OFF |
||
| ) |
Constructor.
| name | the fully qualified name of this Logger |
| level | the level for this Logger. Defaults to Level::OFF |
| log4tango::Logger::~Logger | ( | ) | [virtual] |
Destructor.
| void log4tango::Logger::call_appenders | ( | const LoggingEvent & | event | ) | [protected] |
Call the appenders.
| event | the LogginEvent to log. |
| void log4tango::Logger::debug | ( | const std::string & | message | ) | [inline] |
Log a message with debug level.
| message | string to write in the log file |
| void log4tango::Logger::debug | ( | const char * | string_format, |
| ... | |||
| ) |
Log a message with debug level.
| string_format | Format specifier for the log. |
| ... | The arguments for string_format |
| LoggerStream log4tango::Logger::debug_stream | ( | void | ) | [inline] |
Return a LoggerStream with level DEBUG.
| void log4tango::Logger::error | ( | const char * | string_format, |
| ... | |||
| ) |
Log a message with error level.
| string_format | Format specifier for the log. |
| ... | The arguments for string_format |
| void log4tango::Logger::error | ( | const std::string & | message | ) | [inline] |
Log a message with error level.
| message | string to write in the log file |
| LoggerStream log4tango::Logger::error_stream | ( | void | ) | [inline] |
Return a LoggerStream with level ERROR.
| void log4tango::Logger::fatal | ( | const char * | string_format, |
| ... | |||
| ) |
Log a message with fatal level.
| string_format | Format specifier for the log. |
| ... | The arguments for string_format |
| void log4tango::Logger::fatal | ( | const std::string & | message | ) | [inline] |
Log a message with fatal level.
| message | string to write in the log file |
| LoggerStream log4tango::Logger::fatal_stream | ( | void | ) | [inline] |
Return a LoggerStream with level FATAL.
| Level::Value log4tango::Logger::get_level | ( | ) | const [inline] |
| const std::string& log4tango::Logger::get_name | ( | ) | const [inline] |
Return the logger name.
| LoggerStream log4tango::Logger::get_stream | ( | Level::Value | level, |
| bool | filter = true |
||
| ) | [inline] |
Return a LoggerStream with given Level.
| level | The Level of the LoggerStream. |
| filter | The filter flag |
| void log4tango::Logger::info | ( | const char * | string_format, |
| ... | |||
| ) |
Log a message with info level.
| string_format | Format specifier for the log. |
| ... | The arguments for string_format |
| void log4tango::Logger::info | ( | const std::string & | message | ) | [inline] |
Log a message with info level.
| message | string to write in the log file |
| LoggerStream log4tango::Logger::info_stream | ( | void | ) | [inline] |
Return a LoggerStream with level INFO.
| bool log4tango::Logger::is_debug_enabled | ( | void | ) | const [inline] |
| bool log4tango::Logger::is_error_enabled | ( | void | ) | const [inline] |
| bool log4tango::Logger::is_fatal_enabled | ( | void | ) | const [inline] |
| bool log4tango::Logger::is_info_enabled | ( | void | ) | const [inline] |
| bool log4tango::Logger::is_level_enabled | ( | Level::Value | level | ) | const [inline] |
Returns true if the level of the Logger is equal to or higher than given level.
| level | The level to compare with. |
| bool log4tango::Logger::is_warn_enabled | ( | void | ) | const [inline] |
| void log4tango::Logger::log | ( | Level::Value | level, |
| const char * | string_format, | ||
| ... | |||
| ) |
Log a message with the specified level.
| level | The level of this log message. |
| string_format | Format specifier for the log . |
| ... | The arguments for string_format |
| void log4tango::Logger::log | ( | Level::Value | level, |
| const std::string & | message | ||
| ) | [inline] |
Log a message with the specified level.
| level | The level of this log message. |
| message | string to write in the log file |
| void log4tango::Logger::log_unconditionally | ( | Level::Value | level, |
| const char * | string_format, | ||
| ... | |||
| ) |
Log a message with the specified level without level checking.
| level | The level of this log message. |
| string_format | Format specifier for the log . |
| ... | The arguments for string_format |
| void log4tango::Logger::log_unconditionally | ( | Level::Value | level, |
| const std::string & | message | ||
| ) |
Log a message with the specified level without level checking.
| level | The level of this log message. |
| message | string to write in the log file |
| void log4tango::Logger::set_level | ( | Level::Value | level | ) |
Set the level of this Logger (silently ignores invalid values)
| level | The level to set. |
| void log4tango::Logger::warn | ( | const std::string & | message | ) | [inline] |
Log a message with warn level.
| message | string to write in the log file |
| void log4tango::Logger::warn | ( | const char * | string_format, |
| ... | |||
| ) |
Log a message with warn level.
| string_format | Format specifier for the log. |
| ... | The arguments for string_format |
| LoggerStream log4tango::Logger::warn_stream | ( | void | ) | [inline] |
Return a LoggerStream with level WARN.
1.7.4