org.apache.log.output
Class DefaultOutputLogTarget

java.lang.Object
  |
  +--org.apache.log.output.AbstractTarget
        |
        +--org.apache.log.output.AbstractOutputTarget
              |
              +--org.apache.log.output.io.WriterTarget
                    |
                    +--org.apache.log.output.DefaultOutputLogTarget
All Implemented Interfaces:
ErrorAware, LogTarget
Direct Known Subclasses:
FileOutputLogTarget, ServletOutputLogTarget

Deprecated. Use org.apache.log.output.io.WriterTarget or org.apache.log.output.io.StreamTarget as appropriate as this class encourages unsafe behaviour

public class DefaultOutputLogTarget
extends WriterTarget

This is a basic Output log target that writes to a stream. The format is specified via a string.

Author:
Peter Donald

Field Summary
 
Fields inherited from class org.apache.log.output.io.WriterTarget
m_output
 
Fields inherited from class org.apache.log.output.AbstractOutputTarget
m_formatter
 
Constructor Summary
DefaultOutputLogTarget()
          Deprecated. Default Constructor.
DefaultOutputLogTarget(Formatter formatter)
          Deprecated.  
DefaultOutputLogTarget(OutputStream output)
          Deprecated. Constructor that takes a stream arguement.
DefaultOutputLogTarget(Writer writer)
          Deprecated. Constructor that takes a writer parameter.
DefaultOutputLogTarget(Writer writer, Formatter formatter)
          Deprecated.  
 
Method Summary
protected  void initPattern()
          Deprecated. This is no longer the recomended way to set formatter. It is recomended that it be passed into constructor.
 void setFormat(String format)
          Deprecated. This method is unsafe as it assumes formatter is PatternFormatter and accesses a protected attribute. Instead of calling this method It is recomended that a fully configured formatter is passed into constructor.
 
Methods inherited from class org.apache.log.output.io.WriterTarget
close, setWriter, shutdownWriter, write
 
Methods inherited from class org.apache.log.output.AbstractOutputTarget
doProcessEvent, getFormatter, open, output, setFormatter
 
Methods inherited from class org.apache.log.output.AbstractTarget
error, getErrorHandler, isOpen, processEvent, setErrorHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOutputLogTarget

public DefaultOutputLogTarget(Formatter formatter)
Deprecated. 

DefaultOutputLogTarget

public DefaultOutputLogTarget()
Deprecated. 
Default Constructor.


DefaultOutputLogTarget

public DefaultOutputLogTarget(OutputStream output)
Deprecated. 
Constructor that takes a stream arguement.

Parameters:
output - the output stream

DefaultOutputLogTarget

public DefaultOutputLogTarget(Writer writer)
Deprecated. 
Constructor that takes a writer parameter.

Parameters:
writer - the Writer

DefaultOutputLogTarget

public DefaultOutputLogTarget(Writer writer,
                              Formatter formatter)
Deprecated. 
Method Detail

initPattern

protected void initPattern()
Deprecated. This is no longer the recomended way to set formatter. It is recomended that it be passed into constructor.

Initialize the default pattern.


setFormat

public void setFormat(String format)
Deprecated. This method is unsafe as it assumes formatter is PatternFormatter and accesses a protected attribute. Instead of calling this method It is recomended that a fully configured formatter is passed into constructor.

Set the format string for this target.

Parameters:
format - the format string


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.