#include <Logger.h>
Public Member Functions | |
Logger (const std::string &name, Logger *parent) | |
virtual | ~Logger (void) |
virtual const std::string & | getName (void) const |
virtual void | addHandler (Handler *handler) throw ( exceptions::IllegalArgumentException ) |
virtual void | removeHandler (Handler *handler) |
virtual const std::list< Handler * > & | getHandlers (void) const |
virtual void | setFilter (Filter *filter) |
virtual const Filter * | getFilter (void) const |
virtual Level | getLevel (void) const |
virtual void | setLevel (Level level) |
virtual bool | getUseParentHandlers (void) const |
virtual void | setUseParentHandlers (bool value) |
virtual void | entry (const std::string &blockName, const std::string &file, const int line) |
virtual void | exit (const std::string &blockName, const std::string &file, const int line) |
virtual void | debug (const std::string &file, const int line, const std::string functionName, const std::string &message) |
virtual void | info (const std::string &file, const int line, const std::string functionName, const std::string &message) |
virtual void | warn (const std::string &file, const int line, const std::string functionName, const std::string &message) |
virtual void | error (const std::string &file, const int line, const std::string fnctionName, const std::string &message) |
virtual void | fatal (const std::string &file, const int line, const std::string functionName, const std::string &message) |
virtual void | throwing (const std::string &file, const int line, const std::string fnctionName, const std::string &message) |
virtual bool | isLoggable (Level level) const |
virtual void | log (LogRecord &record) |
virtual void | log (Level level, const std::string &message) |
virtual void | log (Level level, const std::string &file, const int line, const std::string &message,...) |
virtual void | log (Level level, const std::string &file, const int line, const std::string &message, cms::CMSException &ex) |
Static Public Member Functions | |
static Logger * | getAnonymousLogger (void) |
static Logger * | getLogger (const std::string &name) |
Private Attributes | |
std::string | name |
Logger * | parent |
std::list< Handler * > | handlers |
Filter * | filter |
Level | level |
bool | useParentHandlers |
|
Creates a new instance of the Logger with the given name and assign it the given parent logger. The logger will be initially configured with a null Level and with useParentHandlers true.
|
|
|
|
Add a log Handler to receive logging messages. By default, Loggers also send their output to their parent logger. Typically the root Logger is configured with a set of Handlers that essentially act as default handlers for all loggers.
|
|
Log a Debug Level Log If the logger is currently enabled for the DEBUG message level then the given message is forwarded to all the registered output Handler objects.
|
|
Logs an Block Enter message This is a convenience method that is used to tag a block enter, a log record with the class name function name and the string Entering is logged at the DEBUG log level.
|
|
Log a error Level Log If the logger is currently enabled for the error message level then the given message is forwarded to all the registered output Handler objects.
|
|
Logs an Block Exit message This is a convenience method that is used to tag a block exit, a log record with the class name function name and the string Exiting is logged at the DEBUG log level.
|
|
Log a fatal Level Log If the logger is currently enabled for the fatal message level then the given message is forwarded to all the registered output Handler objects.
|
|
Creates an anonymous logger The newly created Logger is not registered in the LogManager namespace. There will be no access checks on updates to the logger. Even although the new logger is anonymous, it is configured to have the root logger ("") as its parent. This means that by default it inherits its effective level and handlers from the root logger. The caller is responsible for destroying the returned logger.
|
|
Gets the Filter object that this class is using.
|
|
Gets a vector containing all the handlers that this class has been assigned to use.
|
|
Get the log Level that has been specified for this Logger. The result may be the Null level, which means that this logger's effective level will be inherited from its parent.
|
|
Find or create a logger for a named subsystem. If a logger has already been created with the given name it is returned. Otherwise a new logger is created. If a new logger is created its log level will be configured based on the LogManager and it will configured to also send logging output to its parent loggers Handlers. It will be registered in the LogManager global namespace.
|
|
Gets the name of this Logger
|
|
Discover whether or not this logger is sending its output to its parent logger.
|
|
Log a info Level Log If the logger is currently enabled for the info message level then the given message is forwarded to all the registered output Handler objects.
|
|
Check if a message of the given level would actually be logged by this logger. This check is based on the Loggers effective level, which may be inherited from its parent.
|
|
Log a message, with associated Throwable information. If the logger is currently enabled for the given message level then the given arguments are stored in a LogRecord which is forwarded to all registered output handlers. Note that the thrown argument is stored in the LogRecord thrown property, rather than the LogRecord parameters property. Thus is it processed specially by output Formatters and is not treated as a formatting parameter to the LogRecord message property.
|
|
Log a message, with the list of params that is formatted into the message string. If the logger is currently enabled for the given message level then the given message is forwarded to all the registered output Handler objects
|
|
Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is forwarded to all the registered output Handler objects
|
|
Log a LogRecord. All the other logging methods in this class call through this method to actually perform any logging. Subclasses can override this single method to capture all log activity.
|
|
Removes the specified Handler and destroys it Returns silently if the given Handler is not found.
|
|
Set a filter to control output on this Logger. After passing the initial "level" check, the Logger will call this Filter to check if a log record should really be published. The caller releases ownership of this filter to this logger
|
|
Set the log level specifying which message levels will be logged by this logger. Message levels lower than this value will be discarded. The level value Level.OFF can be used to turn off logging. If the new level is the Null Level, it means that this node should inherit its level from its nearest ancestor with a specific (non-null) level value.
|
|
pecify whether or not this logger should send its output to it's parent Logger. This means that any LogRecords will also be written to the parent's Handlers, and potentially to its parent, recursively up the namespace.
|
|
Log a Throw Message If the logger is currently enabled for the Throwing message level then the given message is forwarded to all the registered output Handler objects.
|
|
Log a warn Level Log If the logger is currently enabled for the warn message level then the given message is forwarded to all the registered output Handler objects.
|
|
|
|
|
|
|
|
|
|
|
|
|