public class NullAppender extends AppenderSkeleton
AppenderSkeleton.NoOpErrorHandlerclosed, errorHandler, headFilter, layout, name, tailFilter, threshold| Constructor and Description |
|---|
NullAppender() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateOptions()
There are no options to acticate.
|
protected void |
append(LoggingEvent event)
Does not do anything.
|
void |
close()
Release any resources allocated within the appender such as file
handles, network connections, etc.
|
void |
doAppend(LoggingEvent event)
Does not do anything.
|
NullAppender |
getInstance()
Deprecated.
Use getNullAppender instead. getInstance should have been static.
|
static NullAppender |
getNullAppender()
Whenever you can, use this method to retreive an instance instead of instantiating a new one with
new. |
boolean |
requiresLayout()
NullAppenders do not need a layout.
|
addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThresholdpublic static NullAppender getNullAppender()
new.public void activateOptions()
activateOptions in interface OptionHandleractivateOptions in class AppenderSkeletonprotected void append(LoggingEvent event)
append in class AppenderSkeletonpublic void close()
AppenderIt is a programming error to append to a closed appender.
public void doAppend(LoggingEvent event)
doAppend in interface AppenderdoAppend in class AppenderSkeletonevent - The LoggingEvent.@Deprecated public NullAppender getInstance()
new.public boolean requiresLayout()
Copyright © 1999-2022 The 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.