org.apache.commons.logging.impl

Class Jdk14Logger

public class Jdk14Logger extends Object implements Log, Serializable

Implementation of the org.apache.commons.logging.Log interface that wraps the standard JDK logging mechanisms that were introduced in the Merlin release (JDK 1.4).

Version: $Revision: 1.13 $ $Date: 2004/06/06 21:10:21 $

Author: Scott Sanders Berin Loritsch Peter Donald

Field Summary
protected Loggerlogger
The underlying Logger implementation we are using.
protected Stringname
The name of the logger we are wrapping.
Constructor Summary
Jdk14Logger(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.
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

logger

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

name

protected String name
The name of the logger we are wrapping.

Constructor Detail

Jdk14Logger

public Jdk14Logger(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.

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.