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
FieldsModifier and TypeFieldDescriptionprotected static final LevelThis member variable simply ensures that any attempt to initialize this class in a pre-1.4 JVM will result in an ExceptionInInitializerError.protected LoggerThe underlying Logger implementation we are using.protected StringThe name of the logger we are wrapping. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a message withLevel.FINE.voidLogs a message withLevel.FINE.voidLogs a message withLevel.SEVERE.voidLogs a message withLevel.SEVERE.voidLogs a message withLevel.SEVERE.voidLogs a message withLevel.SEVERE.Gets the native Logger instance we are using.voidLogs a message withLevel.INFO.voidLogs a message withLevel.INFO.booleanIs debug logging currently enabled?booleanIs error logging currently enabled?booleanIs fatal logging currently enabled?booleanIs info logging currently enabled?booleanIs trace logging currently enabled?booleanIs warn logging currently enabled?protected voidLogs a message at the given level.voidLogs a message withLevel.FINEST.voidLogs a message withLevel.FINEST.voidLogs a message withLevel.WARNING.voidLogs 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:
isDebugEnabledin interfaceLog- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
Is error logging currently enabled?- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
Is fatal logging currently enabled?- Specified by:
isFatalEnabledin interfaceLog- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
Is info logging currently enabled?- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
Is trace logging currently enabled?- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
Is warn logging currently enabled?- Specified by:
isWarnEnabledin 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.
-