org.apache.avalon.logging.logkit.factory
Class StreamTargetFactory

java.lang.Object
  extended byorg.apache.avalon.logging.logkit.factory.StreamTargetFactory
All Implemented Interfaces:
LogTargetFactory

public class StreamTargetFactory
extends Object
implements LogTargetFactory

TargetFactory for StreamTarget. This factory is able to create different StreamTargets according to the following configuration syntax:

 <stream id="foo">
  <name>stream-context-name</name>
  <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. Two stream names are supported:

  • "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.2 $ $Date: 2004/02/24 21:55:39 $
    Author:
    Avalon Development Team

    Constructor Summary
    StreamTargetFactory(FormatterFactory formatter)
               
     
    Method Summary
     LogTarget createTarget(Configuration configuration)
              Create a LogTarget based on a Configuration
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    StreamTargetFactory

    public StreamTargetFactory(FormatterFactory formatter)
    Method Detail

    createTarget

    public LogTarget createTarget(Configuration configuration)
    Create a LogTarget based on a Configuration

    Specified by:
    createTarget in interface LogTargetFactory


    Copyright © The Apache Software Foundation. All Rights Reserved.