|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.dna.impl.ConsoleLogger
A simple logger facade that simply writes to the Console.
Field Summary | |
static int |
LEVEL_ALL
Constant to indicate that the logger must log all levels. |
static int |
LEVEL_DEBUG
Constant to indicate that the logger must log all levels DEBUG and above. |
static int |
LEVEL_ERROR
Constant to indicate that the logger must log all levels ERROR and above. |
static int |
LEVEL_INFO
Constant to indicate that the logger must log all levels INFO and above. |
static int |
LEVEL_NONE
Constant to indicate that the logger must not log any messages. |
static int |
LEVEL_TRACE
Constant to indicate that the logger must log all levels TRACE and above. |
static int |
LEVEL_WARN
Constant to indicate that the logger must log all levels WARN and above. |
Constructor Summary | |
ConsoleLogger()
Create a Console Logger that logs all messages. |
|
ConsoleLogger(int level)
Create a Console Logger that logs at specified level. |
|
ConsoleLogger(int level,
java.io.PrintStream output)
Create a Console Logger that logs at specified level. |
Method Summary | |
void |
debug(java.lang.String message)
Log a debug message. |
void |
debug(java.lang.String message,
java.lang.Throwable throwable)
Log a debug message with an associated throwable. |
void |
error(java.lang.String message)
Log a error message. |
void |
error(java.lang.String message,
java.lang.Throwable throwable)
Log a error message with an associated throwable. |
Logger |
getChildLogger(java.lang.String name)
Get the child logger with specified name. |
void |
info(java.lang.String message)
Log a info message. |
void |
info(java.lang.String message,
java.lang.Throwable throwable)
Log a info message with an associated throwable. |
boolean |
isDebugEnabled()
Return true if a debug message will be logged. |
boolean |
isErrorEnabled()
Return true if a error message will be logged. |
boolean |
isInfoEnabled()
Return true if an info message will be logged. |
boolean |
isTraceEnabled()
Return true if a trace message will be logged. |
boolean |
isWarnEnabled()
Return true if a warn message will be logged. |
void |
trace(java.lang.String message)
Log a trace message. |
void |
trace(java.lang.String message,
java.lang.Throwable throwable)
Log a trace message with an associated throwable. |
void |
warn(java.lang.String message)
Log a warn message. |
void |
warn(java.lang.String message,
java.lang.Throwable throwable)
Log a warn message with an associated throwable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEVEL_ALL
public static final int LEVEL_TRACE
public static final int LEVEL_DEBUG
public static final int LEVEL_INFO
public static final int LEVEL_WARN
public static final int LEVEL_ERROR
public static final int LEVEL_NONE
Constructor Detail |
public ConsoleLogger()
public ConsoleLogger(int level)
level
- one of the LEVEL_* constantspublic ConsoleLogger(int level, java.io.PrintStream output)
level
- one of the LEVEL_* constantsoutput
- the stream to output toMethod Detail |
public void trace(java.lang.String message)
trace
in interface Logger
message
- the messagepublic void trace(java.lang.String message, java.lang.Throwable throwable)
trace
in interface Logger
message
- the messagethrowable
- the throwablepublic boolean isTraceEnabled()
isTraceEnabled
in interface Logger
public void debug(java.lang.String message)
debug
in interface Logger
message
- the messagepublic void debug(java.lang.String message, java.lang.Throwable throwable)
debug
in interface Logger
message
- the messagethrowable
- the throwablepublic boolean isDebugEnabled()
isDebugEnabled
in interface Logger
public void info(java.lang.String message)
info
in interface Logger
message
- the messagepublic void info(java.lang.String message, java.lang.Throwable throwable)
info
in interface Logger
message
- the messagethrowable
- the throwablepublic boolean isInfoEnabled()
isInfoEnabled
in interface Logger
public void warn(java.lang.String message)
warn
in interface Logger
message
- the messagepublic void warn(java.lang.String message, java.lang.Throwable throwable)
warn
in interface Logger
message
- the messagethrowable
- the throwablepublic boolean isWarnEnabled()
isWarnEnabled
in interface Logger
public void error(java.lang.String message)
error
in interface Logger
message
- the messagepublic void error(java.lang.String message, java.lang.Throwable throwable)
error
in interface Logger
message
- the messagethrowable
- the throwablepublic boolean isErrorEnabled()
isErrorEnabled
in interface Logger
public Logger getChildLogger(java.lang.String name)
getChildLogger
in interface Logger
name
- the name of child logger
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |