Class Jdk14Logger
- java.lang.Object
-
- org.apache.avalon.framework.logger.Jdk14Logger
-
- All Implemented Interfaces:
Logger
public final class Jdk14Logger extends java.lang.Object implements Logger
The default JDK 1.4 wrapper class for Logger. Please note that there is not an exact match to the priority levels that JDK 1.4 logging has and what LogKit or Log4J has. For that reason, the following priority level matching was used:- SEVERE = error, fatalError
- WARNING = warn
- INFO = info
- FINE = debug
JDK 1.4 does allow you to have other levels like: CONFIG, FINER, and FINEST. Most projects don't separate out configuration logging from debugging information. Also, we wanted to maintain backwards compatibility as much as possible. Unfortunately, with all the "fineness" details, there is no equivalent to the "error" log level.
- Version:
- CVS $Revision: 1.18 $ $Date: 2004/02/11 14:34:26 $
- Author:
- Avalon Development Team
-
-
Constructor Summary
Constructors Constructor Description Jdk14Logger(java.util.logging.Logger logImpl)Construct a Logger with specified jdk1.4 logger instance as implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(java.lang.String message)Log a debug message.voiddebug(java.lang.String message, java.lang.Throwable throwable)Log a debug message.voiderror(java.lang.String message)Log a error message.voiderror(java.lang.String message, java.lang.Throwable throwable)Log a error message.voidfatalError(java.lang.String message)Log a fatalError message.voidfatalError(java.lang.String message, java.lang.Throwable throwable)Log a fatalError message.LoggergetChildLogger(java.lang.String name)Create a new child logger.voidinfo(java.lang.String message)Log a info message.voidinfo(java.lang.String message, java.lang.Throwable throwable)Log a info message.booleanisDebugEnabled()Determine if messages of priority "debug" will be logged.booleanisErrorEnabled()Determine if messages of priority "error" will be logged.booleanisFatalErrorEnabled()Determine if messages of priority "fatalError" will be logged.booleanisInfoEnabled()Determine if messages of priority "info" will be logged.booleanisWarnEnabled()Determine if messages of priority "warn" will be logged.voidwarn(java.lang.String message)Log a warn message.voidwarn(java.lang.String message, java.lang.Throwable throwable)Log a warn message.
-
-
-
Method Detail
-
debug
public final void debug(java.lang.String message)
Log a debug message.
-
debug
public final void debug(java.lang.String message, java.lang.Throwable throwable)Log a debug message.
-
isDebugEnabled
public final boolean isDebugEnabled()
Determine if messages of priority "debug" will be logged.- Specified by:
isDebugEnabledin interfaceLogger- Returns:
- true if "debug" messages will be logged
-
info
public final void info(java.lang.String message)
Log a info message.
-
info
public final void info(java.lang.String message, java.lang.Throwable throwable)Log a info message.
-
isInfoEnabled
public final boolean isInfoEnabled()
Determine if messages of priority "info" will be logged.- Specified by:
isInfoEnabledin interfaceLogger- Returns:
- true if "info" messages will be logged
-
warn
public final void warn(java.lang.String message)
Log a warn message.
-
warn
public final void warn(java.lang.String message, java.lang.Throwable throwable)Log a warn message.
-
isWarnEnabled
public final boolean isWarnEnabled()
Determine if messages of priority "warn" will be logged.- Specified by:
isWarnEnabledin interfaceLogger- Returns:
- true if "warn" messages will be logged
-
error
public final void error(java.lang.String message)
Log a error message.
-
error
public final void error(java.lang.String message, java.lang.Throwable throwable)Log a error message.
-
isErrorEnabled
public final boolean isErrorEnabled()
Determine if messages of priority "error" will be logged.- Specified by:
isErrorEnabledin interfaceLogger- Returns:
- true if "error" messages will be logged
-
fatalError
public final void fatalError(java.lang.String message)
Log a fatalError message.- Specified by:
fatalErrorin interfaceLogger- Parameters:
message- the message
-
fatalError
public final void fatalError(java.lang.String message, java.lang.Throwable throwable)Log a fatalError message.- Specified by:
fatalErrorin interfaceLogger- Parameters:
message- the messagethrowable- the throwable
-
isFatalErrorEnabled
public final boolean isFatalErrorEnabled()
Determine if messages of priority "fatalError" will be logged.- Specified by:
isFatalErrorEnabledin interfaceLogger- Returns:
- true if "fatalError" messages will be logged
-
getChildLogger
public final Logger getChildLogger(java.lang.String name)
Create a new child logger. The name of the child logger is [current-loggers-name].[passed-in-name] ThrowsIllegalArgumentExceptionif name has an empty element name- Specified by:
getChildLoggerin interfaceLogger- Parameters:
name- the subname of this logger- Returns:
- the new logger
-
-