org.apache.james.container.spring.adaptor
Class LoggingBridge

java.lang.Object
  extended by org.apache.james.container.spring.adaptor.LoggingBridge
All Implemented Interfaces:
org.apache.avalon.framework.logger.Logger, LoggerToComponentMapper

public class LoggingBridge
extends java.lang.Object
implements org.apache.avalon.framework.logger.Logger, LoggerToComponentMapper

bridge to act as a Avalon logger but effectively forward to a some other logging service


Field Summary
static java.lang.String LEVEL_DEBUG
           
static java.lang.String LEVEL_ERROR
           
static java.lang.String LEVEL_FATAL
           
static java.lang.String LEVEL_INFO
           
static java.lang.String LEVEL_WARN
           
 
Constructor Summary
LoggingBridge()
           
 
Method Summary
 void debug(java.lang.String string)
           
 void debug(java.lang.String string, java.lang.Throwable throwable)
           
 void disableDebug()
           
 void error(java.lang.String string)
           
 void error(java.lang.String string, java.lang.Throwable throwable)
           
 void fatalError(java.lang.String string)
           
 void fatalError(java.lang.String string, java.lang.Throwable throwable)
           
protected  void forwardLogException(java.lang.String level, java.lang.String message, java.lang.Throwable exception)
           
protected  void forwardLogMessage(java.lang.String level, java.lang.String message)
           
 org.apache.avalon.framework.logger.Logger getChildLogger(java.lang.String string)
           
 org.apache.avalon.framework.logger.Logger getComponentLogger(java.lang.String beanName)
           
 void info(java.lang.String string)
           
 void info(java.lang.String string, java.lang.Throwable throwable)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalErrorEnabled()
           
 boolean isInfoEnabled()
           
 boolean isWarnEnabled()
           
 void setLogWorker(LogWorker logWorker)
           
 void warn(java.lang.String string)
           
 void warn(java.lang.String string, java.lang.Throwable throwable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEVEL_DEBUG

public static final java.lang.String LEVEL_DEBUG
See Also:
Constant Field Values

LEVEL_INFO

public static final java.lang.String LEVEL_INFO
See Also:
Constant Field Values

LEVEL_WARN

public static final java.lang.String LEVEL_WARN
See Also:
Constant Field Values

LEVEL_ERROR

public static final java.lang.String LEVEL_ERROR
See Also:
Constant Field Values

LEVEL_FATAL

public static final java.lang.String LEVEL_FATAL
See Also:
Constant Field Values
Constructor Detail

LoggingBridge

public LoggingBridge()
Method Detail

setLogWorker

public void setLogWorker(LogWorker logWorker)

getComponentLogger

public org.apache.avalon.framework.logger.Logger getComponentLogger(java.lang.String beanName)
Specified by:
getComponentLogger in interface LoggerToComponentMapper

forwardLogMessage

protected void forwardLogMessage(java.lang.String level,
                                 java.lang.String message)

forwardLogException

protected void forwardLogException(java.lang.String level,
                                   java.lang.String message,
                                   java.lang.Throwable exception)

getChildLogger

public org.apache.avalon.framework.logger.Logger getChildLogger(java.lang.String string)
Specified by:
getChildLogger in interface org.apache.avalon.framework.logger.Logger

debug

public void debug(java.lang.String string)
Specified by:
debug in interface org.apache.avalon.framework.logger.Logger

debug

public void debug(java.lang.String string,
                  java.lang.Throwable throwable)
Specified by:
debug in interface org.apache.avalon.framework.logger.Logger

isDebugEnabled

public boolean isDebugEnabled()
Specified by:
isDebugEnabled in interface org.apache.avalon.framework.logger.Logger

disableDebug

public void disableDebug()

info

public void info(java.lang.String string)
Specified by:
info in interface org.apache.avalon.framework.logger.Logger

info

public void info(java.lang.String string,
                 java.lang.Throwable throwable)
Specified by:
info in interface org.apache.avalon.framework.logger.Logger

isInfoEnabled

public boolean isInfoEnabled()
Specified by:
isInfoEnabled in interface org.apache.avalon.framework.logger.Logger

warn

public void warn(java.lang.String string)
Specified by:
warn in interface org.apache.avalon.framework.logger.Logger

warn

public void warn(java.lang.String string,
                 java.lang.Throwable throwable)
Specified by:
warn in interface org.apache.avalon.framework.logger.Logger

isWarnEnabled

public boolean isWarnEnabled()
Specified by:
isWarnEnabled in interface org.apache.avalon.framework.logger.Logger

error

public void error(java.lang.String string)
Specified by:
error in interface org.apache.avalon.framework.logger.Logger

error

public void error(java.lang.String string,
                  java.lang.Throwable throwable)
Specified by:
error in interface org.apache.avalon.framework.logger.Logger

isErrorEnabled

public boolean isErrorEnabled()
Specified by:
isErrorEnabled in interface org.apache.avalon.framework.logger.Logger

fatalError

public void fatalError(java.lang.String string)
Specified by:
fatalError in interface org.apache.avalon.framework.logger.Logger

fatalError

public void fatalError(java.lang.String string,
                       java.lang.Throwable throwable)
Specified by:
fatalError in interface org.apache.avalon.framework.logger.Logger

isFatalErrorEnabled

public boolean isFatalErrorEnabled()
Specified by:
isFatalErrorEnabled in interface org.apache.avalon.framework.logger.Logger


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.