org.apache.commons.logging.impl

Class Jdk13LumberjackLogger

public class Jdk13LumberjackLogger extends Object implements Log, Serializable

Implementation of the org.apache.commons.logging.Log interface that wraps the standard JDK logging mechanisms that are available in SourceForge's Lumberjack for JDKs prior to 1.4.

Version: $Revision: 1.6 $ $Date: 2004/06/06 21:13:43 $

Author: Scott Sanders Berin Loritsch Peter Donald Vince Eagen

Field Summary
booleanclassAndMethodFound
protected Loggerlogger
The underlying Logger implementation we are using.
protected Stringname
StringsourceClassName
StringsourceMethodName
Constructor Summary
Jdk13LumberjackLogger(String name)
Construct a named instance of this Logger.
Method Summary
voiddebug(Object message)
Log a message with debug log level.
voiddebug(Object message, Throwable exception)
Log a message and exception with debug log level.
voiderror(Object message)
Log a message with error log level.
voiderror(Object message, Throwable exception)
Log a message and exception with error log level.
voidfatal(Object message)
Log a message with fatal log level.
voidfatal(Object message, Throwable exception)
Log a message and exception with fatal log level.
voidgetClassAndMethod()

Gets the class and method by looking at the stack trace for the first entry that is not this class.

LoggergetLogger()
Return the native Logger instance we are using.
voidinfo(Object message)
Log a message with info log level.
voidinfo(Object message, Throwable exception)
Log a message and exception with info log level.
booleanisDebugEnabled()
Is debug logging currently enabled?
booleanisErrorEnabled()
Is error logging currently enabled?
booleanisFatalEnabled()
Is fatal logging currently enabled?
booleanisInfoEnabled()
Is info logging currently enabled?
booleanisTraceEnabled()
Is trace logging currently enabled?
booleanisWarnEnabled()
Is warn logging currently enabled?
voidlog(Level level, String msg, Throwable ex)
voidtrace(Object message)
Log a message with trace log level.
voidtrace(Object message, Throwable exception)
Log a message and exception with trace log level.
voidwarn(Object message)
Log a message with warn log level.
voidwarn(Object message, Throwable exception)
Log a message and exception with warn log level.

Field Detail

classAndMethodFound

private boolean classAndMethodFound

logger

protected transient Logger logger
The underlying Logger implementation we are using.

name

protected String name

sourceClassName

private String sourceClassName

sourceMethodName

private String sourceMethodName

Constructor Detail

Jdk13LumberjackLogger

public Jdk13LumberjackLogger(String name)
Construct a named instance of this Logger.

Parameters: name Name of the logger to be constructed

Method Detail

debug

public void debug(Object message)
Log a message with debug log level.

debug

public void debug(Object message, Throwable exception)
Log a message and exception with debug log level.

error

public void error(Object message)
Log a message with error log level.

error

public void error(Object message, Throwable exception)
Log a message and exception with error log level.

fatal

public void fatal(Object message)
Log a message with fatal log level.

fatal

public void fatal(Object message, Throwable exception)
Log a message and exception with fatal log level.

getClassAndMethod

private void getClassAndMethod()

Gets the class and method by looking at the stack trace for the first entry that is not this class.

getLogger

public Logger getLogger()
Return the native Logger instance we are using.

info

public void info(Object message)
Log a message with info log level.

info

public void info(Object message, Throwable exception)
Log a message and exception with info log level.

isDebugEnabled

public boolean isDebugEnabled()
Is debug logging currently enabled?

isErrorEnabled

public boolean isErrorEnabled()
Is error logging currently enabled?

isFatalEnabled

public boolean isFatalEnabled()
Is fatal logging currently enabled?

isInfoEnabled

public boolean isInfoEnabled()
Is info logging currently enabled?

isTraceEnabled

public boolean isTraceEnabled()
Is trace logging currently enabled?

isWarnEnabled

public boolean isWarnEnabled()
Is warn logging currently enabled?

log

private void log(Level level, String msg, Throwable ex)

trace

public void trace(Object message)
Log a message with trace log level.

trace

public void trace(Object message, Throwable exception)
Log a message and exception with trace log level.

warn

public void warn(Object message)
Log a message with warn log level.

warn

public void warn(Object message, Throwable exception)
Log a message and exception with warn log level.
Copyright 2002-2004 The Apache Software Foundation.