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

public Class CommonsLogger

extends Object
implements Logger
Class Inheritance
All Implemented Interfaces
org.apache.avalon.framework.logger.Logger
Imports
org.apache.avalon.framework.logger.Logger, org.apache.commons.logging.Log, .LogFactory

An Avalon Logger implementation backed by a {@plaintext Log logger} of commons lLogging.
Author
Avalon Development Team
Since
4.3
Version
$Id: CommonsLogger.java 506231 2007-02-12 02:36:54Z crossley $

Field Summary

Modifier and TypeField and Description
private final Log
private final String

Constructor Summary

AccessConstructor and Description
public
CommonsLogger(final Log
The logger of commons-logging.
log
,
final String
The name of the logger.
name
)

Construct a CommonsLogger.

Method Summary

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

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

Log a debug message.
public 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 void
error(final String
the message
message
)

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

Log a error message.
public 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 void
fatalError(final String
the message
message
)

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

Log a fatalError message.
public 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 Logger
getChildLogger(final String
the subname of this logger
name
)

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

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

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

Log a info message.
public 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 boolean
isDebugEnabled()

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

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

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

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

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

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

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

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

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

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

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

Log a warn message.
public 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

logback to summary
private final Log log
nameback to summary
private final String name

Constructor Detail

CommonsLoggerback to summary
public CommonsLogger(final Log log, final String name)

Construct a CommonsLogger. The constructor needs explicitly the name of the commons-logger, since the commons-logging API misses the functionality to retrieve it from the logger instance.

Parameters
log:Log

The logger of commons-logging.

name:String

The name of the logger.

Since
2.0

Method Detail

debugback to summary
public void debug(final String message)

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

Doc from org.apache.avalon.framework.logger.Logger.debug.

Log a debug message.

Parameters
message:String

the message

See Also
org.apache.avalon.framework.logger.Logger#debug(java.lang.String)
debugback to summary
public void debug(final String message, final Throwable throwable)

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

Doc from org.apache.avalon.framework.logger.Logger.debug.

Log a debug message.

Parameters
message:String

the message

throwable:Throwable

the throwable

See Also
org.apache.avalon.framework.logger.Logger#debug(java.lang.String, java.lang.Throwable)
errorback to summary
public void error(final String message)

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

Doc from org.apache.avalon.framework.logger.Logger.error.

Log a error message.

Parameters
message:String

the message

See Also
org.apache.avalon.framework.logger.Logger#error(java.lang.String)
errorback to summary
public void error(final String message, final Throwable throwable)

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

Doc from org.apache.avalon.framework.logger.Logger.error.

Log a error message.

Parameters
message:String

the message

throwable:Throwable

the throwable

See Also
org.apache.avalon.framework.logger.Logger#error(java.lang.String, java.lang.Throwable)
fatalErrorback to summary
public void fatalError(final String message)

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

Doc from org.apache.avalon.framework.logger.Logger.fatalError.

Log a fatalError message.

Parameters
message:String

the message

See Also
org.apache.avalon.framework.logger.Logger#fatalError(java.lang.String)
fatalErrorback to summary
public void fatalError(final String message, final Throwable throwable)

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

Doc from org.apache.avalon.framework.logger.Logger.fatalError.

Log a fatalError message.

Parameters
message:String

the message

throwable:Throwable

the throwable

See Also
org.apache.avalon.framework.logger.Logger#fatalError(java.lang.String, java.lang.Throwable)
getChildLoggerback to summary
public Logger getChildLogger(final String name)

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

Doc from 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

See Also
org.apache.avalon.framework.logger.Logger#getChildLogger(java.lang.String)
infoback to summary
public void info(final String message)

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

Doc from org.apache.avalon.framework.logger.Logger.info.

Log a info message.

Parameters
message:String

the message

See Also
org.apache.avalon.framework.logger.Logger#info(java.lang.String)
infoback to summary
public void info(final String message, final Throwable throwable)

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

Doc from org.apache.avalon.framework.logger.Logger.info.

Log a info message.

Parameters
message:String

the message

throwable:Throwable

the throwable

See Also
org.apache.avalon.framework.logger.Logger#info(java.lang.String, java.lang.Throwable)
isDebugEnabledback to summary
public boolean isDebugEnabled()

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

Doc from 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

See Also
org.apache.avalon.framework.logger.Logger#isDebugEnabled()
isErrorEnabledback to summary
public boolean isErrorEnabled()

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

Doc from 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

See Also
org.apache.avalon.framework.logger.Logger#isErrorEnabled()
isFatalErrorEnabledback to summary
public boolean isFatalErrorEnabled()

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

Doc from 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

See Also
org.apache.avalon.framework.logger.Logger#isFatalErrorEnabled()
isInfoEnabledback to summary
public boolean isInfoEnabled()

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

Doc from 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

See Also
org.apache.avalon.framework.logger.Logger#isInfoEnabled()
isWarnEnabledback to summary
public boolean isWarnEnabled()

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

Doc from 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

See Also
org.apache.avalon.framework.logger.Logger#isWarnEnabled()
warnback to summary
public void warn(final String message)

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

Doc from org.apache.avalon.framework.logger.Logger.warn.

Log a warn message.

Parameters
message:String

the message

See Also
org.apache.avalon.framework.logger.Logger#warn(java.lang.String)
warnback to summary
public void warn(final String message, final Throwable throwable)

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

Doc from org.apache.avalon.framework.logger.Logger.warn.

Log a warn message.

Parameters
message:String

the message

throwable:Throwable

the throwable

See Also
org.apache.avalon.framework.logger.Logger#warn(java.lang.String, java.lang.Throwable)