log4tango
5.0.1
|
#include <Logger.hh>
Public Member Functions | |
Logger (const std::string &name, Level::Value level=Level::OFF) | |
Constructor. More... | |
virtual | ~Logger () |
Destructor. More... | |
const std::string & | get_name () const |
Return the logger name. More... | |
void | set_level (Level::Value level) |
Set the level of this Logger (silently ignores invalid values) More... | |
Level::Value | get_level () const |
Returns the assigned Level, if any, for this Logger. More... | |
bool | is_level_enabled (Level::Value level) const |
Returns true if the level of the Logger is equal to or higher than given level. More... | |
void | log (Level::Value level, const char *string_format,...) |
Log a message with the specified level. More... | |
void | log (Level::Value level, const std::string &message) |
Log a message with the specified level. More... | |
void | log_unconditionally (Level::Value level, const char *string_format,...) |
Log a message with the specified level without level checking. More... | |
void | log_unconditionally (Level::Value level, const std::string &message) |
Log a message with the specified level without level checking. More... | |
void | debug (const char *string_format,...) |
Log a message with debug level. More... | |
void | debug (const std::string &message) |
Log a message with debug level. More... | |
bool | is_debug_enabled (void) const |
Return true if the Logger will log messages with level DEBUG. More... | |
LoggerStream | debug_stream (void) |
Return a LoggerStream with level DEBUG. More... | |
void | info (const char *string_format,...) |
Log a message with info level. More... | |
void | info (const std::string &message) |
Log a message with info level. More... | |
bool | is_info_enabled (void) const |
Return true if the Logger will log messages with level INFO. More... | |
LoggerStream | info_stream (void) |
Return a LoggerStream with level INFO. More... | |
void | warn (const char *string_format,...) |
Log a message with warn level. More... | |
void | warn (const std::string &message) |
Log a message with warn level. More... | |
bool | is_warn_enabled (void) const |
Return true if the Logger will log messages with level WARN. More... | |
LoggerStream | warn_stream (void) |
Return a LoggerStream with level WARN. More... | |
void | error (const char *string_format,...) |
Log a message with error level. More... | |
void | error (const std::string &message) |
Log a message with error level. More... | |
bool | is_error_enabled (void) const |
Return true if the Logger will log messages with level ERROR. More... | |
LoggerStream | error_stream (void) |
Return a LoggerStream with level ERROR. More... | |
void | fatal (const char *string_format,...) |
Log a message with fatal level. More... | |
void | fatal (const std::string &message) |
Log a message with fatal level. More... | |
bool | is_fatal_enabled (void) const |
Return true if the Logger will log messages with level FATAL. More... | |
LoggerStream | fatal_stream (void) |
Return a LoggerStream with level FATAL. More... | |
LoggerStream | get_stream (Level::Value level, bool filter=true) |
Return a LoggerStream with given Level. More... | |
![]() | |
AppenderAttachable () | |
Constructor. More... | |
virtual | ~AppenderAttachable () |
Destructor. More... | |
void | add_appender (Appender *appender) |
Adds an Appender. More... | |
AppenderList | get_all_appenders (void) |
Get all previously added appenders as a vector. More... | |
Appender * | get_appender (const std::string &name) |
Get an appender by name. More... | |
bool | is_attached (Appender *appender) |
Returns true if the specified appender is in list of attached appanders, false otherwise. More... | |
void | remove_all_appenders () |
Removes all appenders for this Logger. More... | |
void | remove_appender (Appender *appender) |
Remove the appender passed as parameter from the list of appenders. More... | |
void | remove_appender (const std::string &name) |
Remove the appender with the name passed as parameter from the list of appenders. More... | |
Protected Member Functions | |
void | call_appenders (const LoggingEvent &event) |
Call the appenders. More... | |
![]() | |
AppenderAttachable (const AppenderAttachable &other) | |
AppenderAttachable & | operator= (const AppenderAttachable &other) |
Additional Inherited Members | |
![]() | |
AppenderMap | _appenders |
Appenders repository. More... | |
threading::Mutex | _appendersMutex |
A mutex to protect the repository against race conditions. More... | |
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 |
|
virtual |
Destructor.
|
protected |
Call the appenders.
event | the LogginEvent to log. |
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 |
|
inline |
Log a message with debug level.
message | string to write in the log file |
|
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 |
|
inline |
Log a message with error level.
message | string to write in the log file |
|
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 |
|
inline |
Log a message with fatal level.
message | string to write in the log file |
|
inline |
Return a LoggerStream with level FATAL.
|
inline |
|
inline |
Return the logger name.
|
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 |
|
inline |
Log a message with info level.
message | string to write in the log file |
|
inline |
Return a LoggerStream with level INFO.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns true if the level of the Logger is equal to or higher than given level.
level | The level to compare with. |
|
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 |
|
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 char * | string_format, |
... | |||
) |
Log a message with warn level.
string_format | Format specifier for the log. |
... | The arguments for string_format |
|
inline |
Log a message with warn level.
message | string to write in the log file |
|
inline |
Return a LoggerStream with level WARN.