Class CommonsLogger
- java.lang.Object
-
- org.apache.avalon.framework.logger.CommonsLogger
-
-
Constructor Summary
Constructors Constructor Description CommonsLogger(org.apache.commons.logging.Log log, java.lang.String name)Construct a CommonsLogger.
-
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.
-
-
-
Constructor Detail
-
CommonsLogger
public CommonsLogger(org.apache.commons.logging.Log log, java.lang.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- The logger of commons-logging.name- The name of the logger.- Since:
- 2.0
-
-
Method Detail
-
debug
public void debug(java.lang.String message)
Description copied from interface:LoggerLog a debug message.- Specified by:
debugin interfaceLogger- Parameters:
message- the message- See Also:
Logger.debug(java.lang.String)
-
debug
public void debug(java.lang.String message, java.lang.Throwable throwable)Description copied from interface:LoggerLog a debug message.- Specified by:
debugin interfaceLogger- Parameters:
message- the messagethrowable- the throwable- See Also:
Logger.debug(java.lang.String, java.lang.Throwable)
-
isDebugEnabled
public boolean isDebugEnabled()
Description copied from interface:LoggerDetermine if messages of priority "debug" will be logged.- Specified by:
isDebugEnabledin interfaceLogger- Returns:
- true if "debug" messages will be logged
- See Also:
Logger.isDebugEnabled()
-
info
public void info(java.lang.String message)
Description copied from interface:LoggerLog a info message.- Specified by:
infoin interfaceLogger- Parameters:
message- the message- See Also:
Logger.info(java.lang.String)
-
info
public void info(java.lang.String message, java.lang.Throwable throwable)Description copied from interface:LoggerLog a info message.- Specified by:
infoin interfaceLogger- Parameters:
message- the messagethrowable- the throwable- See Also:
Logger.info(java.lang.String, java.lang.Throwable)
-
isInfoEnabled
public boolean isInfoEnabled()
Description copied from interface:LoggerDetermine if messages of priority "info" will be logged.- Specified by:
isInfoEnabledin interfaceLogger- Returns:
- true if "info" messages will be logged
- See Also:
Logger.isInfoEnabled()
-
warn
public void warn(java.lang.String message)
Description copied from interface:LoggerLog a warn message.- Specified by:
warnin interfaceLogger- Parameters:
message- the message- See Also:
Logger.warn(java.lang.String)
-
warn
public void warn(java.lang.String message, java.lang.Throwable throwable)Description copied from interface:LoggerLog a warn message.- Specified by:
warnin interfaceLogger- Parameters:
message- the messagethrowable- the throwable- See Also:
Logger.warn(java.lang.String, java.lang.Throwable)
-
isWarnEnabled
public boolean isWarnEnabled()
Description copied from interface:LoggerDetermine if messages of priority "warn" will be logged.- Specified by:
isWarnEnabledin interfaceLogger- Returns:
- true if "warn" messages will be logged
- See Also:
Logger.isWarnEnabled()
-
error
public void error(java.lang.String message)
Description copied from interface:LoggerLog a error message.- Specified by:
errorin interfaceLogger- Parameters:
message- the message- See Also:
Logger.error(java.lang.String)
-
error
public void error(java.lang.String message, java.lang.Throwable throwable)Description copied from interface:LoggerLog a error message.- Specified by:
errorin interfaceLogger- Parameters:
message- the messagethrowable- the throwable- See Also:
Logger.error(java.lang.String, java.lang.Throwable)
-
isErrorEnabled
public boolean isErrorEnabled()
Description copied from interface:LoggerDetermine if messages of priority "error" will be logged.- Specified by:
isErrorEnabledin interfaceLogger- Returns:
- true if "error" messages will be logged
- See Also:
Logger.isErrorEnabled()
-
fatalError
public void fatalError(java.lang.String message)
Description copied from interface:LoggerLog a fatalError message.- Specified by:
fatalErrorin interfaceLogger- Parameters:
message- the message- See Also:
Logger.fatalError(java.lang.String)
-
fatalError
public void fatalError(java.lang.String message, java.lang.Throwable throwable)Description copied from interface:LoggerLog a fatalError message.- Specified by:
fatalErrorin interfaceLogger- Parameters:
message- the messagethrowable- the throwable- See Also:
Logger.fatalError(java.lang.String, java.lang.Throwable)
-
isFatalErrorEnabled
public boolean isFatalErrorEnabled()
Description copied from interface:LoggerDetermine if messages of priority "fatalError" will be logged.- Specified by:
isFatalErrorEnabledin interfaceLogger- Returns:
- true if "fatalError" messages will be logged
- See Also:
Logger.isFatalErrorEnabled()
-
getChildLogger
public Logger getChildLogger(java.lang.String name)
Description copied from interface:LoggerCreate 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
- See Also:
Logger.getChildLogger(java.lang.String)
-
-