org.openorb.util.logger
Class PrefixingLogger

java.lang.Object
  |
  +--org.openorb.util.logger.PrefixingLogger
All Implemented Interfaces:
org.apache.avalon.framework.logger.Logger

public final class PrefixingLogger
extends Object
implements org.apache.avalon.framework.logger.Logger

A lightweight logger decorator that uses prefixes for child loggers

Version:
$Revision: 1.3 $ $Date: 2003/08/27 17:01:45 $
Author:
Richard G Clark

Constructor Summary
PrefixingLogger(org.apache.avalon.framework.logger.Logger logger)
          Constructs this object with the specified logger and control.
PrefixingLogger(org.apache.avalon.framework.logger.Logger logger, String prefix)
          Constructs this object with the specified logger and control.
 
Method Summary
 void debug(String message)
           
 void debug(String message, Throwable throwable)
           
 void error(String message)
           
 void error(String message, Throwable throwable)
           
 void fatalError(String message)
           
 void fatalError(String message, Throwable throwable)
           
 org.apache.avalon.framework.logger.Logger getChildLogger(String name)
           
 void info(String message)
           
 void info(String message, Throwable throwable)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalErrorEnabled()
           
 boolean isInfoEnabled()
           
 boolean isWarnEnabled()
           
 void warn(String message)
           
 void warn(String message, Throwable throwable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixingLogger

public PrefixingLogger(org.apache.avalon.framework.logger.Logger logger)
Constructs this object with the specified logger and control.
Parameters:
logger - the logger

PrefixingLogger

public PrefixingLogger(org.apache.avalon.framework.logger.Logger logger,
                       String prefix)
Constructs this object with the specified logger and control.
Parameters:
logger - the logger
prefix - the inital prefix
Method Detail

getChildLogger

public org.apache.avalon.framework.logger.Logger getChildLogger(String name)
Specified by:
getChildLogger in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.getChildLogger(String)

debug

public void debug(String message)
Specified by:
debug in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.debug(String)

debug

public void debug(String message,
                  Throwable throwable)
Specified by:
debug in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.debug(String,Throwable)

isDebugEnabled

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

info

public void info(String message)
Specified by:
info in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.info(String)

info

public void info(String message,
                 Throwable throwable)
Specified by:
info in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.info(String,Throwable)

isInfoEnabled

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

warn

public void warn(String message)
Specified by:
warn in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.warn(String)

warn

public void warn(String message,
                 Throwable throwable)
Specified by:
warn in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.warn(String,Throwable)

isWarnEnabled

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

error

public void error(String message)
Specified by:
error in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.error(String)

error

public void error(String message,
                  Throwable throwable)
Specified by:
error in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.error(String,Throwable)

isErrorEnabled

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

fatalError

public void fatalError(String message)
Specified by:
fatalError in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.fatalError(String)

fatalError

public void fatalError(String message,
                       Throwable throwable)
Specified by:
fatalError in interface org.apache.avalon.framework.logger.Logger
See Also:
Logger.fatalError(String,Throwable)

isFatalErrorEnabled

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