|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.util.log.Log4JLoggerWrapper
public class Log4JLoggerWrapper
An implementation of ILogger
that delegates the
calls to the log4j library.
This class also configures the log4j library to use the
configuration file at <configPath>/lumislogconfig.xml
.
ILogger
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface lumis.util.log.ILogger |
---|
ILogger.Level |
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
log4jLogger
The log4j logger instance that is being wrapped. |
Constructor Summary | |
---|---|
Log4JLoggerWrapper(Class pClass)
Creates a wrapper for the log4j logger for the given class. |
|
Log4JLoggerWrapper(String pCategoryName)
Creates a wrapper for the log4j logger for the given category name. |
Method Summary | |
---|---|
void |
debug(Object msg)
Log a message with debug log level. |
void |
debug(Object msg,
Throwable t)
Log an error with debug log level. |
void |
error(Object msg)
Log a message with error log level. |
void |
error(Object msg,
Throwable t)
Log an error with error log level. |
void |
fatal(Object msg)
Log a message with fatal log level. |
void |
fatal(Object msg,
Throwable t)
Log an error with fatal log level. |
ILogger.Level |
getLevel()
Returns the current minimum logging level logged by this instance. |
void |
info(Object msg)
Log a message with info log level. |
void |
info(Object msg,
Throwable t)
Log an error with info log level. |
boolean |
isDebugEnabled()
Is debug logging currently enabled? |
boolean |
isErrorEnabled()
Is error logging currently enabled? |
boolean |
isFatalEnabled()
Is fatal logging currently enabled? |
boolean |
isInfoEnabled()
Is info logging currently enabled? |
boolean |
isWarnEnabled()
Is warn logging currently enabled? |
void |
setLevel(ILogger.Level level)
Sets the minimum logging level logged by this logger instance. |
void |
warn(Object msg)
Log a message with warn log level. |
void |
warn(Object msg,
Throwable t)
Log an error with warn log level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.log4j.Logger log4jLogger
Constructor Detail |
---|
public Log4JLoggerWrapper(Class pClass)
Logger.getLogger(java.lang.Class)
public Log4JLoggerWrapper(String pCategoryName)
Logger.getLogger(java.lang.String)
Method Detail |
---|
public void debug(Object msg)
ILogger
Log a message with debug log level.
debug
in interface ILogger
msg
- log this messagepublic void debug(Object msg, Throwable t)
ILogger
Log an error with debug log level.
debug
in interface ILogger
msg
- log this messaget
- log this causepublic void error(Object msg)
ILogger
Log a message with error log level.
error
in interface ILogger
msg
- log this messagepublic void error(Object msg, Throwable t)
ILogger
Log an error with error log level.
error
in interface ILogger
msg
- log this messaget
- log this causepublic void fatal(Object msg)
ILogger
Log a message with fatal log level.
fatal
in interface ILogger
msg
- log this messagepublic void fatal(Object msg, Throwable t)
ILogger
Log an error with fatal log level.
fatal
in interface ILogger
msg
- log this messaget
- log this causepublic void info(Object msg)
ILogger
Log a message with info log level.
info
in interface ILogger
msg
- log this messagepublic void info(Object msg, Throwable t)
ILogger
Log an error with info log level.
info
in interface ILogger
msg
- log this messaget
- log this causepublic boolean isDebugEnabled()
ILogger
Is debug logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String
concatenation)
when the log level is more than debug.
isDebugEnabled
in interface ILogger
public boolean isInfoEnabled()
ILogger
Is info logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String
concatenation)
when the log level is more than info.
isInfoEnabled
in interface ILogger
public boolean isWarnEnabled()
ILogger
Is warn logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String
concatenation)
when the log level is more than warn.
isWarnEnabled
in interface ILogger
public boolean isErrorEnabled()
ILogger
Is error logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String
concatenation)
when the log level is more than error.
isErrorEnabled
in interface ILogger
public boolean isFatalEnabled()
ILogger
Is fatal logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String
concatenation)
when the log level is more than fatal.
isFatalEnabled
in interface ILogger
public void warn(Object msg)
ILogger
Log a message with warn log level.
warn
in interface ILogger
msg
- log this messagepublic void warn(Object msg, Throwable t)
ILogger
Log an error with warn log level.
warn
in interface ILogger
msg
- log this messaget
- log this causepublic ILogger.Level getLevel()
ILogger
getLevel
in interface ILogger
public void setLevel(ILogger.Level level)
ILogger
setLevel
in interface ILogger
level
- the priority level.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |