Top Description Fields Constructors Methods
org.apache.avalon.framework.logger

public final Class Log4JLogger

extends Object
implements Logger
Class Inheritance
All Implemented Interfaces
org.apache.avalon.framework.logger.Logger
Imports
org.apache.log4j.Level

The default Log4J wrapper class for Logger.
Author
Avalon Development Team
Version
$Id: Log4JLogger.java 506231 2007-02-12 02:36:54Z crossley $

Field Summary

Modifier and TypeField and Description
private static final String
FQCN

Constant for name of class to use when recording caller of log method.

private final Logger

Constructor Summary

AccessConstructor and Description
public
Log4JLogger(final Logger
the category to delegate to
logImpl
)

Create a logger that delegates to specified category.

Method Summary

Modifier and TypeMethod and Description
public final void
debug(final String
the message
message
)

Implements org.apache.avalon.framework.logger.Logger.debug.

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

Implements org.apache.avalon.framework.logger.Logger.debug.

Log a debug message.
public final void
error(final String
the message
message
)

Implements org.apache.avalon.framework.logger.Logger.error.

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

Implements org.apache.avalon.framework.logger.Logger.error.

Log a error message.
public final void
fatalError(final String
the message
message
)

Implements org.apache.avalon.framework.logger.Logger.fatalError.

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

Implements org.apache.avalon.framework.logger.Logger.fatalError.

Log a fatalError message.
public final Logger

Returns:

the new logger
getChildLogger
(final String
the subname of this logger
name
)

Implements org.apache.avalon.framework.logger.Logger.getChildLogger.

Create a new child logger.
public final void
info(final String
the message
message
)

Implements org.apache.avalon.framework.logger.Logger.info.

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

Implements org.apache.avalon.framework.logger.Logger.info.

Log a info message.
public final boolean

Returns:

true if "debug" messages will be logged
isDebugEnabled
()

Implements org.apache.avalon.framework.logger.Logger.isDebugEnabled.

Determine if messages of priority "debug" will be logged.
public final boolean

Returns:

true if "error" messages will be logged
isErrorEnabled
()

Implements org.apache.avalon.framework.logger.Logger.isErrorEnabled.

Determine if messages of priority "error" will be logged.
public final boolean

Returns:

true if "fatalError" messages will be logged
isFatalErrorEnabled
()

Implements org.apache.avalon.framework.logger.Logger.isFatalErrorEnabled.

Determine if messages of priority "fatalError" will be logged.
public final boolean

Returns:

true if "info" messages will be logged
isInfoEnabled
()

Implements org.apache.avalon.framework.logger.Logger.isInfoEnabled.

Determine if messages of priority "info" will be logged.
public final boolean

Returns:

true if "warn" messages will be logged
isWarnEnabled
()

Implements org.apache.avalon.framework.logger.Logger.isWarnEnabled.

Determine if messages of priority "warn" will be logged.
public final void
warn(final String
the message
message
)

Implements org.apache.avalon.framework.logger.Logger.warn.

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

Implements org.apache.avalon.framework.logger.Logger.warn.

Log a warn message.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FQCNback to summary
private static final String FQCN

Constant for name of class to use when recording caller of log method.

m_loggerback to summary
private final Logger m_logger

Constructor Detail

Log4JLoggerback to summary
public Log4JLogger(final Logger logImpl)

Create a logger that delegates to specified category.

Parameters
logImpl:Logger

the category to delegate to

Method Detail

debugback to summary
public final void debug(final String message)

Implements org.apache.avalon.framework.logger.Logger.debug.

Log a debug message.

Parameters
message:String

the message

debugback to summary
public final void debug(final String message, final Throwable throwable)

Implements org.apache.avalon.framework.logger.Logger.debug.

Log a debug message.

Parameters
message:String

the message

throwable:Throwable

the throwable

errorback to summary
public final void error(final String message)

Implements org.apache.avalon.framework.logger.Logger.error.

Log a error message.

Parameters
message:String

the message

errorback to summary
public final void error(final String message, final Throwable throwable)

Implements org.apache.avalon.framework.logger.Logger.error.

Log a error message.

Parameters
message:String

the message

throwable:Throwable

the throwable

fatalErrorback to summary
public final void fatalError(final String message)

Implements org.apache.avalon.framework.logger.Logger.fatalError.

Log a fatalError message.

Parameters
message:String

the message

fatalErrorback to summary
public final void fatalError(final String message, final Throwable throwable)

Implements org.apache.avalon.framework.logger.Logger.fatalError.

Log a fatalError message.

Parameters
message:String

the message

throwable:Throwable

the throwable

getChildLoggerback to summary
public final Logger getChildLogger(final String name)

Implements org.apache.avalon.framework.logger.Logger.getChildLogger.

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:String

the subname of this logger

Returns:Logger

the new logger

infoback to summary
public final void info(final String message)

Implements org.apache.avalon.framework.logger.Logger.info.

Log a info message.

Parameters
message:String

the message

infoback to summary
public final void info(final String message, final Throwable throwable)

Implements org.apache.avalon.framework.logger.Logger.info.

Log a info message.

Parameters
message:String

the message

throwable:Throwable

the throwable

isDebugEnabledback to summary
public final boolean isDebugEnabled()

Implements org.apache.avalon.framework.logger.Logger.isDebugEnabled.

Determine if messages of priority "debug" will be logged.

Returns:boolean

true if "debug" messages will be logged

isErrorEnabledback to summary
public final boolean isErrorEnabled()

Implements org.apache.avalon.framework.logger.Logger.isErrorEnabled.

Determine if messages of priority "error" will be logged.

Returns:boolean

true if "error" messages will be logged

isFatalErrorEnabledback to summary
public final boolean isFatalErrorEnabled()

Implements org.apache.avalon.framework.logger.Logger.isFatalErrorEnabled.

Determine if messages of priority "fatalError" will be logged.

Returns:boolean

true if "fatalError" messages will be logged

isInfoEnabledback to summary
public final boolean isInfoEnabled()

Implements org.apache.avalon.framework.logger.Logger.isInfoEnabled.

Determine if messages of priority "info" will be logged.

Returns:boolean

true if "info" messages will be logged

isWarnEnabledback to summary
public final boolean isWarnEnabled()

Implements org.apache.avalon.framework.logger.Logger.isWarnEnabled.

Determine if messages of priority "warn" will be logged.

Returns:boolean

true if "warn" messages will be logged

warnback to summary
public final void warn(final String message)

Implements org.apache.avalon.framework.logger.Logger.warn.

Log a warn message.

Parameters
message:String

the message

warnback to summary
public final void warn(final String message, final Throwable throwable)

Implements org.apache.avalon.framework.logger.Logger.warn.

Log a warn message.

Parameters
message:String

the message

throwable:Throwable

the throwable