M - The kind of WriterManager under managementpublic abstract class AbstractWriterAppender<M extends WriterManager> extends AbstractAppender
LifeCycle.State| Modifier and Type | Field and Description |
|---|---|
protected boolean |
immediateFlush
Immediate flush means that the underlying writer will be flushed at the
end of each append operation.
|
LOGGER| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWriterAppender(String name,
StringLayout layout,
Filter filter,
boolean ignoreExceptions,
boolean immediateFlush,
M manager)
Instantiates.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(LogEvent event)
Actual writing occurs here.
|
M |
getManager()
Gets the manager.
|
StringLayout |
getStringLayout() |
void |
start()
Make the Filter available for use.
|
void |
stop()
Cleanup the Filter.
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toStringaddFilter, getFilter, hasFilter, isFiltered, removeFilterequalsImpl, getState, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStoppingclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetState, initialize, isStarted, isStoppedprotected final boolean immediateFlush
immediateFlush
is set to false, then there is a good chance that the last few
logs events are not actually written to persistent media if and when the
application crashes.protected AbstractWriterAppender(String name, StringLayout layout, Filter filter, boolean ignoreExceptions, boolean immediateFlush, M manager)
name - The name of the Appender.layout - The layout to format the message.manager - The OutputStreamManager.public void append(LogEvent event)
Most subclasses will need to override this method.
event - The LogEvent.public M getManager()
public StringLayout getStringLayout()
public void start()
AbstractFilterablestart in interface LifeCyclestart in class AbstractFilterablepublic void stop()
AbstractFilterablestop in interface LifeCyclestop in class AbstractFilterableCopyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.