org.apache.log.output
Class DefaultOutputLogTarget
- ErrorAware, LogTarget
public class DefaultOutputLogTarget
This is a basic Output log target that writes to a stream.
The format is specified via a string.
protected void | initPattern() - This is no longer the recomended way to set formatter.
|
void | setFormat(String format) - This method is unsafe as it assumes formatter is PatternFormatter
and accesses a protected attribute.
|
DefaultOutputLogTarget
public DefaultOutputLogTarget()
Default Constructor.
DefaultOutputLogTarget
public DefaultOutputLogTarget(OutputStream output)
Constructor that takes a stream arguement.
output
- the output stream
DefaultOutputLogTarget
public DefaultOutputLogTarget(Writer writer)
Constructor that takes a writer parameter.
DefaultOutputLogTarget
public DefaultOutputLogTarget(Writer writer,
Formatter formatter)
Construct target with a specific writer and formatter.
writer
- the writerformatter
- the formatter
DefaultOutputLogTarget
public DefaultOutputLogTarget(Formatter formatter)
Creation of a new abstract output target instance.
formatter
- the formatter to apply
initPattern
protected void initPattern()
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)
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.
format
- the format string