org.apache.log.output

Class DefaultOutputLogTarget

public class DefaultOutputLogTarget extends WriterTarget

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

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

Author: Peter Donald

Constructor Summary
DefaultOutputLogTarget(Formatter formatter)
DefaultOutputLogTarget()
Default Constructor.
DefaultOutputLogTarget(OutputStream output)
Constructor that takes a stream arguement.
DefaultOutputLogTarget(Writer writer)
Constructor that takes a writer parameter.
DefaultOutputLogTarget(Writer writer, Formatter formatter)
Method Summary
protected voidinitPattern()
Initialize the default pattern.
voidsetFormat(String format)
Set the format string for this target.

Constructor Detail

DefaultOutputLogTarget

public DefaultOutputLogTarget(Formatter formatter)

DefaultOutputLogTarget

public DefaultOutputLogTarget()
Default Constructor.

DefaultOutputLogTarget

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

Parameters: output the output stream

DefaultOutputLogTarget

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

Parameters: writer the Writer

DefaultOutputLogTarget

public DefaultOutputLogTarget(Writer writer, Formatter formatter)

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