org.apache.avalon.excalibur.logger.log4j
Class Log4JAdapter
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.logger.log4j.Log4JAdapter
- All Implemented Interfaces:
- LoggerManager, LogEnabled
- Direct Known Subclasses:
- Log4JConfAdapter
public class Log4JAdapter
- extends AbstractLogEnabled
- implements LoggerManager
This class sits on top of an existing Log4J Hierarchy
and returns logger wrapping Log4J loggers.
Attach PrefixDecorator and/or CachingDecorator if desired.
- Since:
- 4.0
- Version:
- CVS $Revision: 1.4 $ $Date: 2004/03/10 13:54:51 $
- Author:
- Avalon Development Team
Field Summary |
protected org.apache.log4j.spi.LoggerRepository |
m_hierarchy
|
Fields inherited from interface org.apache.avalon.excalibur.logger.LoggerManager |
ROLE |
Constructor Summary |
Log4JAdapter(org.apache.log4j.spi.LoggerRepository hierarchy)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_hierarchy
protected final org.apache.log4j.spi.LoggerRepository m_hierarchy
Log4JAdapter
public Log4JAdapter(org.apache.log4j.spi.LoggerRepository hierarchy)
getLoggerForCategory
public Logger getLoggerForCategory(String categoryName)
- Return the Logger for the specified category.
Log4J probably won't like the "" category name
so we shall better return its getRootLogger() instead.
- Specified by:
getLoggerForCategory
in interface LoggerManager
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
Copyright © 1997-2012 Apache Software Foundation. All Rights Reserved.