java.lang.Object | ||
↳ | org.apache.log4j.Category | |
↳ | org.apache.log4j.Logger |
Known Direct Subclasses |
This is the central class in the log4j package. Most logging operations, except configuration, are done through this class.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.Category
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Shorthand for
getLogger(clazz.getName()) . | |||||||||||
Like
getLogger(String) except that the type of logger
instantiated depends on the type returned by the makeNewLoggerInstance(String) method of the
factory parameter. | |||||||||||
Retrieve a logger named according to the value of the
name parameter. | |||||||||||
Return the root logger for the current logger repository.
| |||||||||||
Check whether this category is enabled for the TRACE Level.
| |||||||||||
Log a message object with the
TRACE level. | |||||||||||
Log a message object with the
TRACE level including the
stack trace of the Throwablet passed as parameter. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.Category
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.log4j.spi.AppenderAttachable
|
Shorthand for getLogger(clazz.getName())
.
clazz | The name of clazz will be used as the
name of the logger to retrieve. See getLogger(String)
for more detailed information.
|
---|
Like getLogger(String)
except that the type of logger
instantiated depends on the type returned by the makeNewLoggerInstance(String)
method of the
factory
parameter.
This method is intended to be used by sub-classes.
name | The name of the logger to retrieve. |
---|---|
factory | A LoggerFactory implementation that will
actually create a new Instance. |
Retrieve a logger named according to the value of the
name
parameter. If the named logger already exists,
then the existing instance will be returned. Otherwise, a new
instance is created.
By default, loggers do not have a set level but inherit it from their neareast ancestor with a set level. This is one of the central features of log4j.
name | The name of the logger to retrieve. |
---|
Return the root logger for the current logger repository.
The Logger.getName()
method for the root logger always returns
stirng value: "root". However, calling
Logger.getLogger("root")
does not retrieve the root
logger but a logger just under root named "root".
In other words, calling this method is the only way to retrieve the root logger.
Check whether this category is enabled for the TRACE Level.
true
if this category is enabled for level
TRACE, false
otherwise.
Log a message object with the TRACE
level.
message | the message object to log. |
---|
Log a message object with the TRACE
level including the
stack trace of the Throwablet
passed as parameter.
See debug(Object)
form for more detailed information.
message | the message object to log. |
---|---|
t | the exception to log, including its stack trace. |