org.apache.avalon.excalibur.logger.factory
Class StreamTargetFactory
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
|
+--org.apache.avalon.excalibur.logger.factory.StreamTargetFactory
- All Implemented Interfaces:
- org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, LogTargetFactory
- public class StreamTargetFactory
- extends AbstractTargetFactory
- implements org.apache.avalon.framework.context.Contextualizable
TargetFactory for org.apache.log.output.io.StreamTarget
This factory is able to create different StreamTargets according to the following
configuration syntax :
<stream id="foo">
<stream>stream-context-name</stream>
<format type="raw|pattern|extended">pattern to be used if needed</format>
</stream>
The "stream-context-name" is the name of an java.io.OutputStream
that
is fetched in the context. This context contains two predefined streams :
"System.out
" for the system output stream,
"System.err
" for the system error stream.
The syntax of "format" is the same as in FileTargetFactory
.
- Version:
- CVS $Revision: 1.3 $ $Date: 2001/12/19 23:34:50 $
- Author:
- Sylvain Wallez
Method Summary |
void |
contextualize(org.apache.avalon.framework.context.Context context)
Get the Context object |
org.apache.log.LogTarget |
createTarget(org.apache.avalon.framework.configuration.Configuration configuration)
Create a LogTarget based on a Configuration |
protected org.apache.log.format.Formatter |
getFormatter(org.apache.avalon.framework.configuration.Configuration conf)
|
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 |
StreamTargetFactory
public StreamTargetFactory()
createTarget
public org.apache.log.LogTarget createTarget(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Create a LogTarget based on a Configuration
- Overrides:
createTarget
in class AbstractTargetFactory
contextualize
public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
- Description copied from class:
AbstractTargetFactory
- Get the Context object
- Specified by:
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
- Overrides:
contextualize
in class AbstractTargetFactory
getFormatter
protected org.apache.log.format.Formatter getFormatter(org.apache.avalon.framework.configuration.Configuration conf)
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.