@Plugin(name="Kafka", category="Core", elementType="appender", printObject=true) public final class KafkaAppender extends AbstractAppender
LifeCycle.State
LOGGER
Modifier and Type | Method and Description |
---|---|
void |
append(LogEvent event)
Logs a LogEvent using whatever logic this Appender wishes to use.
|
static KafkaAppender |
createAppender(Layout<? extends Serializable> layout,
Filter filter,
String name,
boolean ignoreExceptions,
String topic,
Property[] properties) |
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
@PluginFactory public static KafkaAppender createAppender(@PluginElement(value="Layout") Layout<? extends Serializable> layout, @PluginElement(value="Filter") Filter filter, @Required(message="No name provided for KafkaAppender")@PluginAttribute(value="name") String name, @PluginAttribute(value="ignoreExceptions",defaultBoolean=true) boolean ignoreExceptions, @Required(message="No topic provided for KafkaAppender")@PluginAttribute(value="topic") String topic, @PluginElement(value="Properties") Property[] properties)
public void append(LogEvent event)
Appender
event
- The LogEvent.public void start()
AbstractFilterable
start
in interface LifeCycle
start
in class AbstractFilterable
public void stop()
AbstractFilterable
stop
in interface LifeCycle
stop
in class AbstractFilterable
Copyright © 1999-2016 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.