org.apache.avalon.excalibur.logger.decorator
Class PrefixDecorator
java.lang.Object
|
+--org.apache.avalon.excalibur.logger.decorator.LoggerManagerDecorator
|
+--org.apache.avalon.excalibur.logger.decorator.PrefixDecorator
- All Implemented Interfaces:
- Configurable, Contextualizable, Disposable, LogEnabled, LoggerManager, Startable
- public class PrefixDecorator
- extends LoggerManagerDecorator
- implements LoggerManager
This class implements LoggerManager interface by
prepending a prefix to all requests and letting the
wrapped LoggerManager actually create the loggers.
- Since:
- 4.0
- Version:
- CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:33 $
- Author:
- Avalon Development Team
Fields inherited from interface org.apache.avalon.excalibur.logger.LoggerManager |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrefixDecorator
public PrefixDecorator(LoggerManager loggerManager,
String prefix)
- Creates a PrefixDecorator instance.
- Parameters:
prefix
- the prefix to prepend;
can be neither null nor empty.
This is done to avoid ambiguity
in the getDefaultLogger() method - what would we call
in such case getDefaultLogger() or getLoggerForCategory("") ?
getLoggerForCategory
public Logger getLoggerForCategory(String categoryName)
- Return the Logger for the specified category.
- Specified by:
getLoggerForCategory
in interface LoggerManager
- Overrides:
getLoggerForCategory
in class LoggerManagerDecorator
getDefaultLogger
public Logger getDefaultLogger()
- Return the default Logger. This is basically the same
as getting the Logger for the "" category.
- Specified by:
getDefaultLogger
in interface LoggerManager
- Overrides:
getDefaultLogger
in class LoggerManagerDecorator
Copyright © 1997-2004 The Apache Software Foundation. All Rights Reserved.