org.apache.log.output
Class AbstractOutputTarget
- ErrorAware, LogTarget
public abstract class AbstractOutputTarget
Abstract output target.
Any new output target that is writing to a single connected
resource should extend this class directly or indirectly.
protected Formatter | m_formatter - You should not be directly accessing this attribute
as it will become private next release
|
void | close() - Shutdown target.
|
protected void | doProcessEvent(LogEvent event) - Process a log event.
|
Formatter | getFormatter() - Access to formatter is not advised and this method will be removed
in future iterations.
|
protected void | open() - Startup log session.
|
protected void | output(String data) - User should overide write() instead of output().
|
void | setFormatter(Formatter formatter) - In future this method will become protected access.
|
protected void | write(String data) - Abstract method to write data.
|
m_formatter
protected Formatter m_formatter
You should not be directly accessing this attribute
as it will become private next release
Formatter for target.
AbstractOutputTarget
public AbstractOutputTarget()
Parameterless constructor.
AbstractOutputTarget
public AbstractOutputTarget(Formatter formatter)
Creation of a new abstract output target instance.
formatter
- the formatter to apply
close
public void close()
Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
- close in interface AbstractTarget
getFormatter
public Formatter getFormatter()
Access to formatter is not advised and this method will be removed
in future iterations. It remains only for backwards compatability.
Retrieve the associated formatter.
output
protected void output(String data)
User should overide write() instead of output(). Output exists
for backwards compatability and will be removed in future.
Abstract method that will output event.
data
- the data to be output
setFormatter
public void setFormatter(Formatter formatter)
In future this method will become protected access.
Set the formatter.
formatter
- the formatter
write
protected void write(String data)
Abstract method to write data.
data
- the data to be output