net.dpml.util
Class DefaultLogger

java.lang.Object
  extended bynet.dpml.util.DefaultLogger
All Implemented Interfaces:
Logger

public final class DefaultLogger
extends Object
implements Logger

Generic logging channel.

Version:
1.0.0
Author:
The Digital Product Meta Library

Constructor Summary
DefaultLogger()
          Creation of a new console adapter that is used to redirect transit events the system output stream.
DefaultLogger(Logger logger)
          Creation of a new console adapter that is used to redirect transit events the system output stream.
DefaultLogger(String category)
          Creation of a new console adapter that is used to redirect transit events the system output stream.
 
Method Summary
 void debug(String message)
          Log a debug message is debug mode is enabled.
 void error(String message)
          Log a error message.
 void error(String message, Throwable e)
          Log a error message.
 Logger getChildLogger(String category)
          Return a child logger.
 void info(String message)
          Log a info level message.
 boolean isDebugEnabled()
          Return TRUE is debug level logging is enabled.
 boolean isErrorEnabled()
          Return TRUE is error level logging is enabled.
 boolean isInfoEnabled()
          Return TRUE is info level logging is enabled.
 boolean isTraceEnabled()
          Return TRUE is trace level logging is enabled.
 boolean isWarnEnabled()
          Return TRUE is error level logging is enabled.
 void trace(String message)
          Log a debug message is trace mode is enabled.
 void warn(String message)
          Record a warning message.
 void warn(String message, Throwable cause)
          Record a warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLogger

public DefaultLogger()
Creation of a new console adapter that is used to redirect transit events the system output stream.


DefaultLogger

public DefaultLogger(String category)
Creation of a new console adapter that is used to redirect transit events the system output stream.

Parameters:
category - the logging channel category name

DefaultLogger

public DefaultLogger(Logger logger)
Creation of a new console adapter that is used to redirect transit events the system output stream.

Parameters:
logger - the assigned logging channel
Method Detail

isTraceEnabled

public boolean isTraceEnabled()
Return TRUE is trace level logging is enabled.

Specified by:
isTraceEnabled in interface Logger
Returns:
the enabled state of trace logging

isDebugEnabled

public boolean isDebugEnabled()
Return TRUE is debug level logging is enabled.

Specified by:
isDebugEnabled in interface Logger
Returns:
the enabled state of debug logging

isInfoEnabled

public boolean isInfoEnabled()
Return TRUE is info level logging is enabled.

Specified by:
isInfoEnabled in interface Logger
Returns:
the enabled state of info logging

isWarnEnabled

public boolean isWarnEnabled()
Return TRUE is error level logging is enabled.

Specified by:
isWarnEnabled in interface Logger
Returns:
the enabled state of error logging

isErrorEnabled

public boolean isErrorEnabled()
Return TRUE is error level logging is enabled.

Specified by:
isErrorEnabled in interface Logger
Returns:
the enabled state of error logging

trace

public void trace(String message)
Log a debug message is trace mode is enabled.

Specified by:
trace in interface Logger
Parameters:
message - the message to log

debug

public void debug(String message)
Log a debug message is debug mode is enabled.

Specified by:
debug in interface Logger
Parameters:
message - the message to log

info

public void info(String message)
Log a info level message.

Specified by:
info in interface Logger
Parameters:
message - the message to log

warn

public void warn(String message)
Record a warning message.

Specified by:
warn in interface Logger
Parameters:
message - the warning message to record

warn

public void warn(String message,
                 Throwable cause)
Record a warning message.

Specified by:
warn in interface Logger
Parameters:
message - the warning message to record
cause - the causal exception

error

public void error(String message)
Log a error message.

Specified by:
error in interface Logger
Parameters:
message - the message to log

error

public void error(String message,
                  Throwable e)
Log a error message.

Specified by:
error in interface Logger
Parameters:
message - the message to log
e - the causal exception

getChildLogger

public Logger getChildLogger(String category)
Return a child logger.

Specified by:
getChildLogger in interface Logger
Parameters:
category - the sub-category name.
Returns:
the child logging channel