public class SocketAppender extends AbstractOutputStreamAppender
immediateFlush
LOGGER
Modifier | Constructor and Description |
---|---|
protected |
SocketAppender(String name,
Layout<? extends Serializable> layout,
Filter filter,
AbstractSocketManager manager,
boolean ignoreExceptions,
boolean immediateFlush,
Advertiser advertiser) |
Modifier and Type | Method and Description |
---|---|
static SocketAppender |
createAppender(String host,
String portNum,
String protocol,
String delay,
String immediateFail,
String name,
String immediateFlush,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
Configuration config) |
protected static AbstractSocketManager |
createSocketManager(Protocol p,
String host,
int port,
int delay,
boolean immediateFail,
Layout<? extends Serializable> layout) |
void |
stop()
Stop the Appender.
|
append, getManager, replaceManager, start
error, error, error, getHandler, getLayout, getName, ignoreExceptions, isStarted, parseInt, setHandler, toString
addFilter, getFilter, hasFilter, isFiltered, removeFilter, startFilter, stopFilter
protected SocketAppender(String name, Layout<? extends Serializable> layout, Filter filter, AbstractSocketManager manager, boolean ignoreExceptions, boolean immediateFlush, Advertiser advertiser)
public void stop()
AbstractAppender
stop
in interface LifeCycle
stop
in class AbstractOutputStreamAppender
public static SocketAppender createAppender(String host, String portNum, String protocol, String delay, String immediateFail, String name, String immediateFlush, String ignore, Layout<? extends Serializable> layout, Filter filter, String advertise, Configuration config)
host
- The name of the host to connect to.portNum
- The port to connect to on the target host.protocol
- The Protocol to use.delay
- The interval in which failed writes should be retried.immediateFail
- True if the write should fail if no socket is immediately available.name
- The name of the Appender.immediateFlush
- "true" if data should be flushed on each write.ignore
- If "true"
(default) exceptions encountered when appending events are logged; otherwise
they are propagated to the caller.layout
- The layout to use (defaults to SerializedLayout).filter
- The Filter or null.advertise
- "true" if the appender configuration should be advertised, "false" otherwise.config
- The Configurationprotected static AbstractSocketManager createSocketManager(Protocol p, String host, int port, int delay, boolean immediateFail, Layout<? extends Serializable> layout)
Copyright © 1999-2014 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.