org.apache.avalon.excalibur.logger.factory
Class ServletTargetFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
          extended byorg.apache.avalon.excalibur.logger.factory.ServletTargetFactory
All Implemented Interfaces:
Configurable, Contextualizable, LogEnabled, LogTargetFactory

public final class ServletTargetFactory
extends AbstractTargetFactory

ServletTargetFactory class. This factory creates a ServletOutputLogTargets. It uses the context-key attribute to locate the required ServletContext from the Context object passed to this factory. The default context-key is servlet-context.


 <servlet id="target-id" context-key="context-key-to-servlet-context-object">
  <format type="raw|pattern|extended">pattern to be used if needed</format>
 </servlet>

 
<format>
The type attribute of the pattern element denotes the type of Formatter to be used and according to it the pattern to use for. This elements defaults to:

%7.7{priority} %5.5{time} [%8.8{category}] (%{context}): %{message}\\n%{throwable}

Since:
4.0
Version:
CVS $Revision: 1.10 $ $Date: 2004/03/10 13:54:50 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
m_configuration, m_context
 
Constructor Summary
ServletTargetFactory()
           
 
Method Summary
 LogTarget createTarget(Configuration configuration)
          create a LogTarget based on a Configuration
protected  Formatter getFormatter(Configuration conf)
           
 
Methods inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
configure, contextualize
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletTargetFactory

public ServletTargetFactory()
Method Detail

createTarget

public final LogTarget createTarget(Configuration configuration)
                             throws ConfigurationException
create a LogTarget based on a Configuration

Throws:
ConfigurationException

getFormatter

protected Formatter getFormatter(Configuration conf)


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.