net.anidb.logging
Class AbstractLog
java.lang.Object
net.anidb.logging.AbstractLog
- All Implemented Interfaces:
- org.apache.commons.logging.Log
- Direct Known Subclasses:
- ConsoleLog
public abstract class AbstractLog
- extends java.lang.Object
- implements org.apache.commons.logging.Log
The superclass of all logger classes.
The subclass defines were the messages are send to. The following system
properties are supported to configure the behavior of the subclasses of this
logger:
net.anidb.logging.defaultlog - Default logging detail level
for all instances of the subclasses of AbstractLog. Must be one of ("trace",
"debug", "info", "warn", "error", or "fatal"). If not specified, defaults to
"info".
net.anidb.logging.showlogname - Set to true if you want the
Log instance name to be included in output messages. Defaults to
false.
net.anidb.logging.showShortLogname - Set to
true if you want the last component of the name to be included
in output messages. Defaults to true.
net.anidb.logging.showdatetime - Set to true if
you want the current date and time to be included in output messages. Default
is false.
net.anidb.logging.dateTimeFormat - Default date and time
format for all instances of AbstractLog. See SimpleDateFormat for
further information. If not specified, defaults to
"yyyy/MM/dd HH:mm:ss:SSS zzz".
- Version:
- 1.0, 11.01.2010
- Author:
- grizzlyxp
(http://anidb.net/perl-bin/animedb.pl?show=userpage&uid=63935)
|
Constructor Summary |
AbstractLog(java.lang.String className)
Creates a logger. |
|
Method Summary |
void |
debug(java.lang.Object message)
|
void |
debug(java.lang.Object message,
java.lang.Throwable cause)
|
void |
error(java.lang.Object message)
|
void |
error(java.lang.Object message,
java.lang.Throwable cause)
|
void |
fatal(java.lang.Object message)
|
void |
fatal(java.lang.Object message,
java.lang.Throwable cause)
|
void |
info(java.lang.Object message)
|
void |
info(java.lang.Object message,
java.lang.Throwable cause)
|
boolean |
isDebugEnabled()
|
boolean |
isErrorEnabled()
|
boolean |
isFatalEnabled()
|
boolean |
isInfoEnabled()
|
boolean |
isTraceEnabled()
|
boolean |
isWarnEnabled()
|
void |
trace(java.lang.Object message)
|
void |
trace(java.lang.Object message,
java.lang.Throwable cause)
|
void |
warn(java.lang.Object message)
|
void |
warn(java.lang.Object message,
java.lang.Throwable cause)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLog
public AbstractLog(java.lang.String className)
- Creates a logger.
- Parameters:
className - The class name.
isTraceEnabled
public boolean isTraceEnabled()
- Specified by:
isTraceEnabled in interface org.apache.commons.logging.Log
isDebugEnabled
public boolean isDebugEnabled()
- Specified by:
isDebugEnabled in interface org.apache.commons.logging.Log
isInfoEnabled
public boolean isInfoEnabled()
- Specified by:
isInfoEnabled in interface org.apache.commons.logging.Log
isWarnEnabled
public boolean isWarnEnabled()
- Specified by:
isWarnEnabled in interface org.apache.commons.logging.Log
isErrorEnabled
public boolean isErrorEnabled()
- Specified by:
isErrorEnabled in interface org.apache.commons.logging.Log
isFatalEnabled
public boolean isFatalEnabled()
- Specified by:
isFatalEnabled in interface org.apache.commons.logging.Log
trace
public void trace(java.lang.Object message)
- Specified by:
trace in interface org.apache.commons.logging.Log
trace
public void trace(java.lang.Object message,
java.lang.Throwable cause)
- Specified by:
trace in interface org.apache.commons.logging.Log
debug
public void debug(java.lang.Object message)
- Specified by:
debug in interface org.apache.commons.logging.Log
debug
public void debug(java.lang.Object message,
java.lang.Throwable cause)
- Specified by:
debug in interface org.apache.commons.logging.Log
info
public void info(java.lang.Object message)
- Specified by:
info in interface org.apache.commons.logging.Log
info
public void info(java.lang.Object message,
java.lang.Throwable cause)
- Specified by:
info in interface org.apache.commons.logging.Log
warn
public void warn(java.lang.Object message)
- Specified by:
warn in interface org.apache.commons.logging.Log
warn
public void warn(java.lang.Object message,
java.lang.Throwable cause)
- Specified by:
warn in interface org.apache.commons.logging.Log
error
public void error(java.lang.Object message)
- Specified by:
error in interface org.apache.commons.logging.Log
error
public void error(java.lang.Object message,
java.lang.Throwable cause)
- Specified by:
error in interface org.apache.commons.logging.Log
fatal
public void fatal(java.lang.Object message)
- Specified by:
fatal in interface org.apache.commons.logging.Log
fatal
public void fatal(java.lang.Object message,
java.lang.Throwable cause)
- Specified by:
fatal in interface org.apache.commons.logging.Log