M
- The kind of OutputStreamManager
under managementpublic abstract class AbstractOutputStreamAppender<M extends OutputStreamManager> extends AbstractAppender
LifeCycle.State
LOGGER
Modifier | Constructor and Description |
---|---|
protected |
AbstractOutputStreamAppender(String name,
Layout<? extends Serializable> layout,
Filter filter,
boolean ignoreExceptions,
boolean immediateFlush,
M manager)
Instantiates a WriterAppender and set the output destination to a new
OutputStreamWriter
initialized with os as its OutputStream . |
Modifier and Type | Method and Description |
---|---|
void |
append(LogEvent event)
Actual writing occurs here.
|
boolean |
getImmediateFlush()
Gets the immediate flush setting.
|
M |
getManager()
Gets the manager.
|
void |
start()
Make the Filter available for use.
|
void |
stop()
Cleanup the Filter.
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toString
addFilter, getFilter, hasFilter, isFiltered, removeFilter
equalsImpl, getState, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getState, initialize, isStarted, isStopped
protected AbstractOutputStreamAppender(String name, Layout<? extends Serializable> layout, Filter filter, boolean ignoreExceptions, boolean immediateFlush, M manager)
OutputStreamWriter
initialized with os
as its OutputStream
.name
- The name of the Appender.layout
- The layout to format the message.manager
- The OutputStreamManager.public boolean getImmediateFlush()
public M getManager()
public void start()
AbstractFilterable
start
in interface LifeCycle
start
in class AbstractFilterable
public void stop()
AbstractFilterable
stop
in interface LifeCycle
stop
in class AbstractFilterable
public void append(LogEvent event)
Most subclasses of AbstractOutputStreamAppender
will need to override this method.
event
- The LogEvent.Copyright © 1999-2017 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.