org.apache.avalon.framework.logger
Class Jdk14Logger
java.lang.Object
org.apache.avalon.framework.logger.Jdk14Logger
- Logger
public final class Jdk14Logger
extends java.lang.Object
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:
- Avalon Development Team
Jdk14Logger(java.util.logging.Logger logImpl) - Construct a Logger with specified jdk1.4 logger instance as implementation.
|
void | debug(String message) - Log a debug message.
|
void | debug(String message, Throwable throwable) - Log a debug message.
|
void | error(String message) - Log a error message.
|
void | error(String message, Throwable throwable) - Log a error message.
|
void | fatalError(String message) - Log a fatalError message.
|
void | fatalError(String message, Throwable throwable) - Log a fatalError message.
|
Logger | getChildLogger(String name) - Create a new child logger.
|
void | info(String message) - Log a info message.
|
void | info(String message, Throwable throwable) - Log a info message.
|
boolean | isDebugEnabled() - Determine if messages of priority "debug" will be logged.
|
boolean | isErrorEnabled() - Determine if messages of priority "error" will be logged.
|
boolean | isFatalErrorEnabled() - Determine if messages of priority "fatalError" will be logged.
|
boolean | isInfoEnabled() - Determine if messages of priority "info" will be logged.
|
boolean | isWarnEnabled() - Determine if messages of priority "warn" will be logged.
|
void | warn(String message) - Log a warn message.
|
void | warn(String message, Throwable throwable) - Log a warn message.
|
Jdk14Logger
public Jdk14Logger(java.util.logging.Logger logImpl)
Construct a Logger with specified jdk1.4 logger instance as implementation.
logImpl
- the jdk1.4 logger instance to delegate to
debug
public final void debug(String message)
Log a debug message.
- debug in interface Logger
message
- the message
debug
public final void debug(String message,
Throwable throwable)
Log a debug message.
- debug in interface Logger
message
- the messagethrowable
- the throwable
error
public final void error(String message)
Log a error message.
- error in interface Logger
message
- the message
error
public final void error(String message,
Throwable throwable)
Log a error message.
- error in interface Logger
message
- the messagethrowable
- the throwable
fatalError
public final void fatalError(String message)
Log a fatalError message.
- fatalError in interface Logger
message
- the message
fatalError
public final void fatalError(String message,
Throwable throwable)
Log a fatalError message.
- fatalError in interface Logger
message
- the messagethrowable
- the throwable
getChildLogger
public final Logger getChildLogger(String name)
Create a new child logger.
The name of the child logger is [current-loggers-name].[passed-in-name]
Throws IllegalArgumentException
if name has an empty element name
- getChildLogger in interface Logger
name
- the subname of this logger
- the new logger
info
public final void info(String message)
Log a info message.
- info in interface Logger
message
- the message
info
public final void info(String message,
Throwable throwable)
Log a info message.
- info in interface Logger
message
- the messagethrowable
- the throwable
isDebugEnabled
public final boolean isDebugEnabled()
Determine if messages of priority "debug" will be logged.
- isDebugEnabled in interface Logger
- true if "debug" messages will be logged
isErrorEnabled
public final boolean isErrorEnabled()
Determine if messages of priority "error" will be logged.
- isErrorEnabled in interface Logger
- true if "error" messages will be logged
isFatalErrorEnabled
public final boolean isFatalErrorEnabled()
Determine if messages of priority "fatalError" will be logged.
- isFatalErrorEnabled in interface Logger
- true if "fatalError" messages will be logged
isInfoEnabled
public final boolean isInfoEnabled()
Determine if messages of priority "info" will be logged.
- isInfoEnabled in interface Logger
- true if "info" messages will be logged
isWarnEnabled
public final boolean isWarnEnabled()
Determine if messages of priority "warn" will be logged.
- isWarnEnabled in interface Logger
- true if "warn" messages will be logged
warn
public final void warn(String message)
Log a warn message.
- warn in interface Logger
message
- the message
warn
public final void warn(String message,
Throwable throwable)
Log a warn message.
- warn in interface Logger
message
- the messagethrowable
- the throwable
"Copyright B) 2001 Apache Jakarta Project. All Rights Reserved."