Constructor and Description |
---|
Log4jLogger(java.lang.String name)
Constructs a logger object with the given name.
|
Log4jLogger(java.lang.String name,
java.util.ResourceBundle resourceBundle) |
Modifier and Type | Method and Description |
---|---|
void |
addAppender(org.apache.log4j.Appender newAppender) |
void |
debug(java.lang.Object message)
Log a message to the Log4j Category with
DEBUG priority. |
void |
debug(java.lang.Object message,
java.lang.Throwable t)
Log an error to the Log4j Category with
DEBUG Level. |
void |
error(java.lang.Object message)
Log a message to the Log4j Category with
ERROR Level. |
void |
error(java.lang.Object message,
java.lang.Throwable t)
Log an error to the Log4j Category with
ERROR Level. |
void |
fatal(java.lang.Object message)
Log a message to the Log4j Category with
FATAL Level. |
void |
fatal(java.lang.Object message,
java.lang.Throwable t)
Log an error to the Log4j Category with
FATAL Level. |
org.apache.log4j.Appender |
getAppender(java.lang.String name) |
org.apache.log4j.Level |
getLevel()
Get the log level of the logger.
|
void |
info(java.lang.Object message)
Log a message to the Log4j Category with
INFO Level. |
void |
info(java.lang.Object message,
java.lang.Throwable t)
Log an error to the Log4j Category with
INFO Level. |
boolean |
isDebugEnabled()
Check whether the Log4j Category used is enabled for
DEBUG Level. |
boolean |
isErrorEnabled()
Check whether the Log4j Category used is enabled for
ERROR Level. |
boolean |
isFatalEnabled()
Check whether the Log4j Category used is enabled for
FATAL Level. |
boolean |
isInfoEnabled()
Check whether the Log4j Category used is enabled for
INFO Level. |
boolean |
isTraceEnabled()
Check whether the Log4j Category used is enabled for
TRACE Level. |
boolean |
isWarnEnabled()
Check whether the Log4j Category used is enabled for
WARN Level. |
void |
logDisregardLevel(java.lang.String msgGroup,
java.lang.String msgKey,
java.lang.Object[] params)
Write log disregard log level.
|
void |
removeAppender(java.lang.String name) |
void |
setLevel(org.apache.log4j.Level level)
Change the log level of the logger.
|
void |
warn(java.lang.Object message)
Log a message to the Log4j Category with
WARN Level. |
void |
warn(java.lang.Object message,
java.lang.Throwable t)
Log an error to the Log4j Category with
WARN Level. |
public Log4jLogger(java.lang.String name)
name
- a logger namepublic Log4jLogger(java.lang.String name, java.util.ResourceBundle resourceBundle)
public void debug(java.lang.Object message)
DEBUG
priority.public void debug(java.lang.Object message, java.lang.Throwable t)
DEBUG
Level.public void info(java.lang.Object message)
INFO
Level.public void info(java.lang.Object message, java.lang.Throwable t)
INFO
Level.public void warn(java.lang.Object message)
WARN
Level.public void warn(java.lang.Object message, java.lang.Throwable t)
WARN
Level.public void error(java.lang.Object message)
ERROR
Level.public void error(java.lang.Object message, java.lang.Throwable t)
ERROR
Level.public void fatal(java.lang.Object message)
FATAL
Level.public void fatal(java.lang.Object message, java.lang.Throwable t)
FATAL
Level.public boolean isDebugEnabled()
DEBUG
Level.isDebugEnabled
in interface MXLogger
public boolean isErrorEnabled()
ERROR
Level.isErrorEnabled
in interface MXLogger
public boolean isFatalEnabled()
FATAL
Level.isFatalEnabled
in interface MXLogger
public boolean isInfoEnabled()
INFO
Level.isInfoEnabled
in interface MXLogger
public boolean isTraceEnabled()
TRACE
Level.
For Log4J, this returns the value of isDebugEnabled()
public boolean isWarnEnabled()
WARN
Level.isWarnEnabled
in interface MXLogger
public void setLevel(org.apache.log4j.Level level)
Change the log level of the logger.
public org.apache.log4j.Level getLevel()
Get the log level of the logger.
returns the log level of the logger.public void logDisregardLevel(java.lang.String msgGroup, java.lang.String msgKey, java.lang.Object[] params)
logDisregardLevel
in interface MXLogger
msgGroup
- msgKey
- params
- public void addAppender(org.apache.log4j.Appender newAppender)
public void removeAppender(java.lang.String name)
public org.apache.log4j.Appender getAppender(java.lang.String name)