org.sakaiproject.component.framework.log
Class CommonsLogger

java.lang.Object
  extended byorg.sakaiproject.component.framework.log.CommonsLogger
All Implemented Interfaces:
Logger

public class CommonsLogger
extends Object
implements Logger

CommonsLogger is an implementation of the Sakai log Service API using the Apache Jakarta Commons Logger.

Version:
$Revision: 632 $
Author:
University of Michigan, Sakai Software Development Team

Constructor Summary
CommonsLogger()
          No arg constructor (no dependencies, no configuration)
 
Method Summary
 void debug(Object message)
          Log a "debug" type message.
 void debug(Object message, Throwable t)
          Log a "debug" type message.
 void destroy()
          Final cleanup.
 void error(Object message)
          Log a "error" type message.
 void error(Object message, Throwable t)
          Log a "error" type message.
 void fatal(Object message)
          Log a "fatal" type message.
 void fatal(Object message, Throwable t)
          Log a "fatal" type message.
 void info(Object message)
          Log a "info" type message.
 void info(Object message, Throwable t)
          Log a "info" type message.
 void init()
          Final initialization, once all dependencies are set.
 boolean isDebugEnabled()
          Check if the logger's enabled level includes generation of "debug" type messages.
 boolean isErrorEnabled()
          Check if the logger's enabled level includes generation of "error" type messages.
 boolean isFatalEnabled()
          Check if the logger's enabled level includes generation of "fatal" type messages.
 boolean isInfoEnabled()
          Check if the logger's enabled level includes generation of "info" type messages.
 boolean isTraceEnabled()
          Check if the logger's enabled level includes generation of "trace" type messages.
 boolean isWarnEnabled()
          Check if the logger's enabled level includes generation of "warn" type messages.
 void trace(Object message)
          Log a "trace" type message.
 void trace(Object message, Throwable t)
          Log a "trace" type message.
 void warn(Object message)
          Log a "warn" type message.
 void warn(Object message, Throwable t)
          Log a "warn" type message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsLogger

public CommonsLogger()
No arg constructor (no dependencies, no configuration)

Method Detail

init

public void init()
Final initialization, once all dependencies are set.


destroy

public void destroy()
Final cleanup.


isTraceEnabled

public boolean isTraceEnabled()
Check if the logger's enabled level includes generation of "trace" type messages.

Specified by:
isTraceEnabled in interface Logger
Returns:
true if trace logging is currently enabled, false if not.

isDebugEnabled

public boolean isDebugEnabled()
Check if the logger's enabled level includes generation of "debug" type messages.

Specified by:
isDebugEnabled in interface Logger
Returns:
true if debug logging is currently enabled, false if not.

isInfoEnabled

public boolean isInfoEnabled()
Check if the logger's enabled level includes generation of "info" type messages.

Specified by:
isInfoEnabled in interface Logger
Returns:
true if info logging is currently enabled, false if not.

isWarnEnabled

public boolean isWarnEnabled()
Check if the logger's enabled level includes generation of "warn" type messages.

Specified by:
isWarnEnabled in interface Logger
Returns:
true if warn logging is currently enabled, false if not.

isErrorEnabled

public boolean isErrorEnabled()
Check if the logger's enabled level includes generation of "error" type messages.

Specified by:
isErrorEnabled in interface Logger
Returns:
true if error logging is currently enabled, false if not.

isFatalEnabled

public boolean isFatalEnabled()
Check if the logger's enabled level includes generation of "fatal" type messages.

Specified by:
isFatalEnabled in interface Logger
Returns:
true if fatal logging is currently enabled, false if not.

trace

public void trace(Object message)
Log a "trace" type message.

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

trace

public void trace(Object message,
                  Throwable t)
Log a "trace" type message.

Specified by:
trace in interface Logger
Parameters:
message - The message to log.
t - The throwable to add to the message in the log.

debug

public void debug(Object message)
Log a "debug" type message.

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

debug

public void debug(Object message,
                  Throwable t)
Log a "debug" type message.

Specified by:
debug in interface Logger
Parameters:
message - The message to log.
t - The throwable to add to the message in the log.

info

public void info(Object message)
Log a "info" type message.

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

info

public void info(Object message,
                 Throwable t)
Log a "info" type message.

Specified by:
info in interface Logger
Parameters:
message - The message to log.
t - The throwable to add to the message in the log.

warn

public void warn(Object message)
Log a "warn" type message.

Specified by:
warn in interface Logger
Parameters:
message - The message to log.

warn

public void warn(Object message,
                 Throwable t)
Log a "warn" type message.

Specified by:
warn in interface Logger
Parameters:
message - The message to log.
t - The throwable to add to the message in the log.

error

public void error(Object message)
Log a "error" type message.

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

error

public void error(Object message,
                  Throwable t)
Log a "error" type message.

Specified by:
error in interface Logger
Parameters:
message - The message to log.
t - The throwable to add to the message in the log.

fatal

public void fatal(Object message)
Log a "fatal" type message.

Specified by:
fatal in interface Logger
Parameters:
message - The message to log.

fatal

public void fatal(Object message,
                  Throwable t)
Log a "fatal" type message.

Specified by:
fatal in interface Logger
Parameters:
message - The message to log.
t - The throwable to add to the message in the log.