org.logicalcobwebs.logging.impl
Class LogKitLogger

java.lang.Object
  extended by org.logicalcobwebs.logging.impl.LogKitLogger
All Implemented Interfaces:
Log

public final class LogKitLogger
extends java.lang.Object
implements Log

Implementation of org.logicalcobwebs.logging.Log that wraps the jakarta-avalon-logkit logging system. Configuration of LogKit is left to the user.

LogKit accepts only String messages. Therefore, this implementation converts object messages into strings by called their toString() method before logging them.

Version:
$Id: LogKitLogger.java,v 1.2 2003/02/08 14:27:51 chr32 Exp $
Author:
Scott Sanders, Robert Burrell Donkin *

Field Summary
private  Logger logger
          Logging goes to this LogKit logger
 
Constructor Summary
LogKitLogger(java.lang.String name)
          Construct LogKitLogger which wraps the LogKit logger with given name.
 
Method Summary
 void debug(java.lang.Object message)
          Log message to LogKit logger with DEBUG priority.
 void debug(java.lang.Object message, java.lang.Throwable t)
          Log error to LogKit logger with DEBUG priority.
 void error(java.lang.Object message)
          Log message to LogKit logger with ERROR priority.
 void error(java.lang.Object message, java.lang.Throwable t)
          Log error to LogKit logger with ERROR priority.
 void fatal(java.lang.Object message)
          Log message to LogKit logger with FATAL_ERROR priority.
 void fatal(java.lang.Object message, java.lang.Throwable t)
          Log error to LogKit logger with FATAL_ERROR priority.
 void info(java.lang.Object message)
          Log message to LogKit logger with INFO priority.
 void info(java.lang.Object message, java.lang.Throwable t)
          Log error to LogKit logger with INFO priority.
 boolean isDebugEnabled()
          Check whether the LogKit logger will log messages of priority DEBUG.
 boolean isErrorEnabled()
          Check whether the LogKit logger will log messages of priority ERROR.
 boolean isFatalEnabled()
          Check whether the LogKit logger will log messages of priority FATAL_ERROR.
 boolean isInfoEnabled()
          Check whether the LogKit logger will log messages of priority INFO.
 boolean isTraceEnabled()
          Check whether the LogKit logger will log messages of priority DEBUG.
 boolean isWarnEnabled()
          Check whether the LogKit logger will log messages of priority WARN.
 void trace(java.lang.Object message)
          Log message to LogKit logger with DEBUG priority.
 void trace(java.lang.Object message, java.lang.Throwable t)
          Log error to LogKit logger with DEBUG priority.
 void warn(java.lang.Object message)
          Log message to LogKit logger with WARN priority.
 void warn(java.lang.Object message, java.lang.Throwable t)
          Log error to LogKit logger with WARN priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private Logger logger
Logging goes to this LogKit logger

Constructor Detail

LogKitLogger

public LogKitLogger(java.lang.String name)
Construct LogKitLogger which wraps the LogKit logger with given name.

Parameters:
name - log name
Method Detail

trace

public void trace(java.lang.Object message)
Log message to LogKit logger with DEBUG priority.

Specified by:
trace in interface Log
Parameters:
message - log this message

trace

public void trace(java.lang.Object message,
                  java.lang.Throwable t)
Log error to LogKit logger with DEBUG priority.

Specified by:
trace in interface Log
Parameters:
message - log this message
t - log this cause

debug

public void debug(java.lang.Object message)
Log message to LogKit logger with DEBUG priority.

Specified by:
debug in interface Log
Parameters:
message - log this message

debug

public void debug(java.lang.Object message,
                  java.lang.Throwable t)
Log error to LogKit logger with DEBUG priority.

Specified by:
debug in interface Log
Parameters:
message - log this message
t - log this cause

info

public void info(java.lang.Object message)
Log message to LogKit logger with INFO priority.

Specified by:
info in interface Log
Parameters:
message - log this message

info

public void info(java.lang.Object message,
                 java.lang.Throwable t)
Log error to LogKit logger with INFO priority.

Specified by:
info in interface Log
Parameters:
message - log this message
t - log this cause

warn

public void warn(java.lang.Object message)
Log message to LogKit logger with WARN priority.

Specified by:
warn in interface Log
Parameters:
message - log this message

warn

public void warn(java.lang.Object message,
                 java.lang.Throwable t)
Log error to LogKit logger with WARN priority.

Specified by:
warn in interface Log
Parameters:
message - log this message
t - log this cause

error

public void error(java.lang.Object message)
Log message to LogKit logger with ERROR priority.

Specified by:
error in interface Log
Parameters:
message - log this message

error

public void error(java.lang.Object message,
                  java.lang.Throwable t)
Log error to LogKit logger with ERROR priority.

Specified by:
error in interface Log
Parameters:
message - log this message
t - log this cause

fatal

public void fatal(java.lang.Object message)
Log message to LogKit logger with FATAL_ERROR priority.

Specified by:
fatal in interface Log
Parameters:
message - log this message

fatal

public void fatal(java.lang.Object message,
                  java.lang.Throwable t)
Log error to LogKit logger with FATAL_ERROR priority.

Specified by:
fatal in interface Log
Parameters:
message - log this message
t - log this cause

isDebugEnabled

public boolean isDebugEnabled()
Check whether the LogKit logger will log messages of priority DEBUG.

Specified by:
isDebugEnabled in interface Log

isErrorEnabled

public boolean isErrorEnabled()
Check whether the LogKit logger will log messages of priority ERROR.

Specified by:
isErrorEnabled in interface Log

isFatalEnabled

public boolean isFatalEnabled()
Check whether the LogKit logger will log messages of priority FATAL_ERROR.

Specified by:
isFatalEnabled in interface Log

isInfoEnabled

public boolean isInfoEnabled()
Check whether the LogKit logger will log messages of priority INFO.

Specified by:
isInfoEnabled in interface Log

isTraceEnabled

public boolean isTraceEnabled()
Check whether the LogKit logger will log messages of priority DEBUG.

Specified by:
isTraceEnabled in interface Log

isWarnEnabled

public boolean isWarnEnabled()
Check whether the LogKit logger will log messages of priority WARN.

Specified by:
isWarnEnabled in interface Log