@Plugin(name="CountingNoOp", category="Core", elementType="appender", printObject=true) public class CountingNoOpAppender extends AbstractAppender
LifeCycle.State
LOGGER
ELEMENT_TYPE
Constructor and Description |
---|
CountingNoOpAppender(String name,
Layout<?> layout) |
Modifier and Type | Method and Description |
---|---|
void |
append(LogEvent event)
Logs a LogEvent using whatever logic this Appender wishes to use.
|
static CountingNoOpAppender |
createAppender(String name)
Creates a CountingNoOp Appender.
|
long |
getCount() |
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toString
addFilter, getFilter, hasFilter, isFiltered, removeFilter, start, stop
equalsImpl, getState, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping
public long getCount()
public void append(LogEvent event)
Appender
event
- The LogEvent.@PluginFactory public static CountingNoOpAppender createAppender(@PluginAttribute(value="name") String name)
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.