Package org.apache.commons.logging.impl
Class Jdk13LumberjackLogger
java.lang.Object
org.apache.commons.logging.impl.Jdk13LumberjackLogger
- All Implemented Interfaces:
Serializable
,Log
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.- Since:
- 1.1
- Version:
- $Id: Jdk13LumberjackLogger.java 1432663 2013-01-13 17:24:18Z tn $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
protected static final Level
This member variable simply ensures that any attempt to initialise this class in a pre-1.4 JVM will result in an ExceptionInInitializerError.protected Logger
The underlying Logger implementation we are using.protected String
private static final long
Serializable version identifier.private String
private String
-
Constructor Summary
ConstructorsConstructorDescriptionJdk13LumberjackLogger
(String name) Construct a named instance of this Logger. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a message withjava.util.logging.Level.FINE
.void
Logs a message withjava.util.logging.Level.FINE
.void
Logs a message withjava.util.logging.Level.SEVERE
.void
Logs a message withjava.util.logging.Level.SEVERE
.void
Logs a message withjava.util.logging.Level.SEVERE
.void
Logs a message withjava.util.logging.Level.SEVERE
.private void
Gets the class and method by looking at the stack trace for the first entry that is not this class.Return the native Logger instance we are using.void
Logs a message withjava.util.logging.Level.INFO
.void
Logs a message withjava.util.logging.Level.INFO
.boolean
Is debug logging currently enabled?boolean
Is error logging currently enabled?boolean
Is fatal logging currently enabled?boolean
Is info logging currently enabled?boolean
Is trace logging currently enabled?boolean
Is warn logging currently enabled?private void
void
Logs a message withjava.util.logging.Level.FINEST
.void
Logs a message withjava.util.logging.Level.FINEST
.void
Logs a message withjava.util.logging.Level.WARNING
.void
Logs a message withjava.util.logging.Level.WARNING
.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerializable version identifier.- See Also:
-
logger
The underlying Logger implementation we are using. -
name
-
sourceClassName
-
sourceMethodName
-
classAndMethodFound
private boolean classAndMethodFound -
dummyLevel
This member variable simply ensures that any attempt to initialise this class in a pre-1.4 JVM will result in an ExceptionInInitializerError. It must not be private, as an optimising compiler could detect that it is not used and optimise it away.
-
-
Constructor Details
-
Jdk13LumberjackLogger
Construct a named instance of this Logger.- Parameters:
name
- Name of the logger to be constructed
-
-
Method Details
-
log
-
getClassAndMethod
private void getClassAndMethod()Gets the class and method by looking at the stack trace for the first entry that is not this class. -
debug
Logs a message withjava.util.logging.Level.FINE
. -
debug
Logs a message withjava.util.logging.Level.FINE
. -
error
Logs a message withjava.util.logging.Level.SEVERE
. -
error
Logs a message withjava.util.logging.Level.SEVERE
. -
fatal
Logs a message withjava.util.logging.Level.SEVERE
. -
fatal
Logs a message withjava.util.logging.Level.SEVERE
. -
getLogger
Return the native Logger instance we are using. -
info
Logs a message withjava.util.logging.Level.INFO
. -
info
Logs a message withjava.util.logging.Level.INFO
. -
isDebugEnabled
public boolean isDebugEnabled()Is debug logging currently enabled?- Specified by:
isDebugEnabled
in interfaceLog
- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()Is error logging currently enabled?- Specified by:
isErrorEnabled
in interfaceLog
- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()Is fatal logging currently enabled?- Specified by:
isFatalEnabled
in interfaceLog
- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()Is info logging currently enabled?- Specified by:
isInfoEnabled
in interfaceLog
- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()Is trace logging currently enabled?- Specified by:
isTraceEnabled
in interfaceLog
- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()Is warn logging currently enabled?- Specified by:
isWarnEnabled
in interfaceLog
- Returns:
- true if warn is enabled in the underlying logger.
-
trace
Logs a message withjava.util.logging.Level.FINEST
. -
trace
Logs a message withjava.util.logging.Level.FINEST
. -
warn
Logs a message withjava.util.logging.Level.WARNING
. -
warn
Logs a message withjava.util.logging.Level.WARNING
.
-