org.apache.avalon.framework.logger

Interface Logger

public interface Logger

This is a facade for the different logging subsystems. It offers a simplified interface that follows IOC patterns and a simplified priority/level/severity abstraction.

Version: $Id: Logger.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $

Author: Avalon Development Team

Method Summary
voiddebug(String message)
Log a debug message.
voiddebug(String message, Throwable throwable)
Log a debug message.
voiderror(String message)
Log a error message.
voiderror(String message, Throwable throwable)
Log a error message.
voidfatalError(String message)
Log a fatalError message.
voidfatalError(String message, Throwable throwable)
Log a fatalError message.
LoggergetChildLogger(String name)
Create a new child logger.
voidinfo(String message)
Log a info message.
voidinfo(String message, 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(String message)
Log a warn message.
voidwarn(String message, Throwable throwable)
Log a warn message.

Method Detail

debug

public void debug(String message)
Log a debug message.

Parameters: message the message

debug

public void debug(String message, Throwable throwable)
Log a debug message.

Parameters: message the message throwable the throwable

error

public void error(String message)
Log a error message.

Parameters: message the message

error

public void error(String message, Throwable throwable)
Log a error message.

Parameters: message the message throwable the throwable

fatalError

public void fatalError(String message)
Log a fatalError message.

Parameters: message the message

fatalError

public void fatalError(String message, Throwable throwable)
Log a fatalError message.

Parameters: message the message throwable the throwable

getChildLogger

public 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

Parameters: name the subname of this logger

Returns: the new logger

info

public void info(String message)
Log a info message.

Parameters: message the message

info

public void info(String message, Throwable throwable)
Log a info message.

Parameters: message the message throwable the throwable

isDebugEnabled

public boolean isDebugEnabled()
Determine if messages of priority "debug" will be logged.

Returns: true if "debug" messages will be logged

isErrorEnabled

public boolean isErrorEnabled()
Determine if messages of priority "error" will be logged.

Returns: true if "error" messages will be logged

isFatalErrorEnabled

public boolean isFatalErrorEnabled()
Determine if messages of priority "fatalError" will be logged.

Returns: true if "fatalError" messages will be logged

isInfoEnabled

public boolean isInfoEnabled()
Determine if messages of priority "info" will be logged.

Returns: true if "info" messages will be logged

isWarnEnabled

public boolean isWarnEnabled()
Determine if messages of priority "warn" will be logged.

Returns: true if "warn" messages will be logged

warn

public void warn(String message)
Log a warn message.

Parameters: message the message

warn

public void warn(String message, Throwable throwable)
Log a warn message.

Parameters: message the message throwable the throwable