public class StreamTargetFactory extends AbstractTargetFactory implements org.apache.avalon.framework.context.Contextualizable
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.
m_configuration, m_context| Constructor and Description |
|---|
StreamTargetFactory() |
| Modifier and Type | Method and Description |
|---|---|
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) |
configurepublic org.apache.log.LogTarget createTarget(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
createTarget in interface LogTargetFactoryorg.apache.avalon.framework.configuration.ConfigurationExceptionpublic void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
AbstractTargetFactorycontextualize in interface org.apache.avalon.framework.context.Contextualizablecontextualize in class AbstractTargetFactoryorg.apache.avalon.framework.context.ContextExceptionprotected org.apache.log.format.Formatter getFormatter(org.apache.avalon.framework.configuration.Configuration conf)