Package org.apache.commons.logging.impl
Class Jdk14Logger
java.lang.Object
org.apache.commons.logging.impl.Jdk14Logger
- All Implemented Interfaces:
Serializable,Log
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:
- $Id: Jdk14Logger.java 1448063 2013-02-20 10:01:41Z tn $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final LevelThis member variable simply ensures that any attempt to initialise 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.private static final longSerializable version identifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a message withjava.util.logging.Level.FINE.voidLogs a message withjava.util.logging.Level.FINE.voidLogs a message withjava.util.logging.Level.SEVERE.voidLogs a message withjava.util.logging.Level.SEVERE.voidLogs a message withjava.util.logging.Level.SEVERE.voidLogs a message withjava.util.logging.Level.SEVERE.Return the native Logger instance we are using.voidLogs a message withjava.util.logging.Level.INFO.voidLogs a message withjava.util.logging.Level.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 voidvoidLogs a message withjava.util.logging.Level.FINEST.voidLogs a message withjava.util.logging.Level.FINEST.voidLogs a message withjava.util.logging.Level.WARNING.voidLogs a message withjava.util.logging.Level.WARNING.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerializable version identifier.- See Also:
-
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. -
logger
The underlying Logger implementation we are using. -
name
The name of the logger we are wrapping.
-
-
Constructor Details
-
Jdk14Logger
Construct a named instance of this Logger.- Parameters:
name- Name of the logger to be constructed
-
-
Method Details
-
log
-
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:
isDebugEnabledin interfaceLog- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()Is error logging currently enabled?- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()Is fatal logging currently enabled?- Specified by:
isFatalEnabledin interfaceLog- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()Is info logging currently enabled?- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()Is trace logging currently enabled?- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()Is warn logging currently enabled?- Specified by:
isWarnEnabledin 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.
-