Package org.apache.commons.logging.impl
Class Jdk14Logger
java.lang.Object
org.apache.commons.logging.impl.Jdk14Logger
- All Implemented Interfaces:
Serializable
,Log
Implements the
org.apache.commons.logging.Log
interface to wrap the standard JDK logging mechanisms that were
introduced in the Merlin release (JDK 1.4).- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Level
This member variable simply ensures that any attempt to initialize this class in a pre-1.4 JVM will result in an ExceptionInInitializerError.protected Logger
The underlying Logger implementation we are using.protected String
The name of the logger we are wrapping. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a message withLevel.FINE
.void
Logs a message withLevel.FINE
.void
Logs a message withLevel.SEVERE
.void
Logs a message withLevel.SEVERE
.void
Logs a message withLevel.SEVERE
.void
Logs a message withLevel.SEVERE
.Gets the native Logger instance we are using.void
Logs a message withLevel.INFO
.void
Logs a message withLevel.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?protected void
Logs a message at the given level.void
Logs a message withLevel.FINEST
.void
Logs a message withLevel.FINEST
.void
Logs a message withLevel.WARNING
.void
Logs a message withLevel.WARNING
.
-
Field Details
-
dummyLevel
This member variable simply ensures that any attempt to initialize this class in a pre-1.4 JVM will result in an ExceptionInInitializerError. It must not be private, as an optimizing compiler could detect that it is not used and optimize it away. -
logger
The underlying Logger implementation we are using. -
name
The name of the logger we are wrapping.
-
-
Constructor Details
-
Jdk14Logger
Constructs a named instance of this Logger.- Parameters:
name
- Name of the logger to be constructed
-
-
Method Details
-
debug
Logs a message withLevel.FINE
. -
debug
Logs a message withLevel.FINE
. -
error
Logs a message withLevel.SEVERE
. -
error
Logs a message withLevel.SEVERE
. -
fatal
Logs a message withLevel.SEVERE
. -
fatal
Logs a message withLevel.SEVERE
. -
getLogger
Gets the native Logger instance we are using.- Returns:
- the native Logger instance we are using.
-
info
Logs a message withLevel.INFO
. -
info
Logs a message withLevel.INFO
. -
isDebugEnabled
Is debug logging currently enabled?- Specified by:
isDebugEnabled
in interfaceLog
- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
Is error logging currently enabled?- Specified by:
isErrorEnabled
in interfaceLog
- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
Is fatal logging currently enabled?- Specified by:
isFatalEnabled
in interfaceLog
- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
Is info logging currently enabled?- Specified by:
isInfoEnabled
in interfaceLog
- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
Is trace logging currently enabled?- Specified by:
isTraceEnabled
in interfaceLog
- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
Is warn logging currently enabled?- Specified by:
isWarnEnabled
in interfaceLog
- Returns:
- true if warn is enabled in the underlying logger.
-
log
Logs a message at the given level.- Parameters:
level
- The level.msg
- The message.ex
- The exception.
-
trace
Logs a message withLevel.FINEST
. -
trace
Logs a message withLevel.FINEST
. -
warn
Logs a message withLevel.WARNING
. -
warn
Logs a message withLevel.WARNING
.
-