Inheritance diagram for Logger:
Public Member Functions | |
virtual void | addAppender (const AppenderPtr &newAppender) |
void | assertLog (bool assertion, const String &msg) |
void | callAppenders (const spi::LoggingEventPtr &event) |
void | closeNestedAppenders () |
void | debug (const String &message, const char *file=0, int line=-1) |
void | error (const String &message, const char *file=0, int line=-1) |
void | fatal (const String &message, const char *file=0, int line=-1) |
void | forcedLog (const LevelPtr &level, const String &message, const char *file=0, int line=-1) |
bool | getAdditivity () const |
AppenderList | getAllAppenders () const |
AppenderPtr | getAppender (const String &name) const |
virtual const LevelPtr & | getEffectiveLevel () const |
spi::LoggerRepositoryPtr | getLoggerRepository () const |
const String & | getName () const |
const LoggerPtr & | getParent () const |
const LevelPtr & | getLevel () const |
helpers::ResourceBundlePtr | getResourceBundle () const |
void | info (const String &message, const char *file=NULL, int line=-1) |
bool | isAttached (const AppenderPtr &appender) const |
bool | isDebugEnabled () const |
bool | isEnabledFor (const LevelPtr &level) const |
bool | isInfoEnabled () const |
bool | isWarnEnabled () const |
bool | isErrorEnabled () const |
bool | isFatalEnabled () const |
void | l7dlog (const LevelPtr &level, const String &key, const char *file, int line,...) |
void | log (const LevelPtr &level, const String &message, const char *file=0, int line=-1) |
void | removeAllAppenders () |
void | removeAppender (const AppenderPtr &appender) |
void | removeAppender (const String &name) |
void | setAdditivity (bool additive) |
virtual void | setLevel (const LevelPtr &level) |
void | setResourceBundle (const helpers::ResourceBundlePtr &bundle) |
void | warn (const String &message, const char *file=NULL, int line=-1) |
Static Public Member Functions | |
LoggerPtr | getLogger (const String &name) |
LoggerPtr | getRootLogger () |
LoggerPtr | getLogger (const String &name, spi::LoggerFactoryPtr factory) |
Protected Member Functions | |
Logger (const String &name) | |
void | forcedLog (const String &fqcn, const LevelPtr &level, const String &message, const char *file=0, int line=-1) |
String | getResourceBundleString (const String &key) const |
void | setHierarchy (spi::LoggerRepository *repository) |
Protected Attributes | |
String | name |
LevelPtr | level |
LoggerPtr | parent |
helpers::ResourceBundlePtr | resourceBundle |
bool | additive |
Static Protected Attributes | |
String | FQCN = Logger::getStaticClass().getName() |
|
This constructor created a new It is intended to be used by sub-classes only. You should not create categories directly.
|
|
Add
If Implements AppenderAttachable. |
|
If
logs
|
|
Call the appenders in the hierrachy starting at This method calls all the appenders inherited from the hierarchy circumventing any evaluation of whether to log or not to log the particular log request.
|
|
Close all attached appenders implementing the AppenderAttachable interface. |
|
Log a message string with the DEBUG level.
This method first checks if this logger is
|
|
Log a message string with the ERROR level.
This method first checks if this logger is
|
|
Log a message string with the FATAL level.
This method first checks if this logger is
|
|
This method creates a new logging event and logs the event without further checks.
|
|
This method creates a new logging event and logs the event without further checks.
|
|
Get the additivity flag for this Logger instance. |
|
Get the appenders contained in this logger as an AppenderList. If no appenders can be found, then an empty AppenderList is returned.
Implements AppenderAttachable. |
|
Look for the appender named as
Return the appender with that name if in the list. Return Implements AppenderAttachable. |
|
Starting from this logger, search the logger hierarchy for a non-null level and return it. The Logger class is designed so that this method executes as quickly as possible.
|
|
Returns the assigned Level, if any, for this Logger.
|
|
Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory#makeNewLoggerInstance method of the This method is intended to be used by sub-classes.
|
|
Retrieve a logger by name. |
|
Return the the LoggerRepository where this |
|
Return the logger name. |
|
Returns the parent of this logger. Note that the parent of a given logger may change during the lifetime of the logger.
The root logger will return |
|
Return the inherited ResourceBundle for this logger.
This method walks the hierarchy to find the appropriate resource bundle. It will return the resource bundle attached to the closest ancestor of this logger, much like the way priorities are searched. In case there is no bundle in the hierarchy then |
|
Returns the string resource coresponding to If the resource cannot be found, then an error message will be logged complaining about the missing resource.
|
|
Retrieve the root logger. |
|
Log a message string with the INFO level.
This method first checks if this logger is
|
|
Is the appender passed as parameter attached to this category? Implements AppenderAttachable. |
|
Check whether this logger is enabled for the This function is intended to lessen the computational cost of disabled log debug statements.
For some logger->debug("debug message"); You incur the cost constructing the message, concatenation in this case, regardless of whether the message is logged or not. If you are worried about speed, then you should write if(logger->isDebugEnabled()) { logger->debug("debug message"); }
This way you will not incur the cost of parameter construction if debugging is disabled for
|
|
Check whether this logger is enabled for a given Level passed as parameter. See also isDebugEnabled.
|
|
Check whether this logger is enabled for the error Level. See also isDebugEnabled.
|
|
Check whether this logger is enabled for the fatal Level. See also isDebugEnabled.
|
|
Check whether this logger is enabled for the info Level. See also isDebugEnabled.
|
|
Check whether this logger is enabled for the warn Level. See also isDebugEnabled.
|
|
Log a localized and parameterized message.
First, the user supplied
|
|
This is the most generic printing method. It is intended to be invoked by wrapper classes.
|
|
Remove all previously added appenders from this logger instance. This is useful when re-reading configuration information. Implements AppenderAttachable. |
|
Remove the appender with the name passed as parameter form the list of appenders. Implements AppenderAttachable. |
|
Remove the appender passed as parameter form the list of appenders. Implements AppenderAttachable. |
|
Set the additivity flag for this Logger instance. |
|
Only the Hierarchy class can set the hierarchy of a logger. |
|
Set the level of this Logger. If you are passing any of As in logger->setLevel(Level::DEBUG); Null values are admitted. Reimplemented in RootCategory. |
|
Set the resource bundle to be used with localized logging method l7dlog. |
|
Log a message string with the WARN level.
This method first checks if this logger is
|
|
Additivity is set to true by default, that is children inherit the appenders of their ancestors by default. If this variable is set to |
|
The fully qualified name of the Category class. See also the getFQCN method. |
|
The assigned level of this logger. The |
|
The name of this logger. |
|
The parent of this logger. All loggers have at least one ancestor which is the root logger. |
|
The resourceBundle for localized messages.
|