Class Log4jNullAppender.Builder
- java.lang.Object
-
- org.apache.logging.log4j.core.filter.AbstractFilterable.Builder<B>
-
- org.apache.logging.log4j.core.appender.AbstractAppender.Builder<Log4jNullAppender.Builder>
-
- com.github.robtimus.junit.support.extension.testlogger.Log4jNullAppender.Builder
-
- Enclosing class:
- Log4jNullAppender
public static final class Log4jNullAppender.Builder extends AbstractAppender.Builder<Log4jNullAppender.Builder>
A builder forLog4jNullAppender
instances.- Author:
- Rob Spoor
- Since:
- 2.1
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Log4jNullAppender
build()
Creates a newLog4jNullAppender
instance.Log4jNullAppender.Builder
setStartAutomatically(boolean startAutomatically)
Sets whether or not to start appenders automatically when callingbuild()
.-
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender.Builder
getConfiguration, getErrorPrefix, getLayout, getName, getOrCreateLayout, getOrCreateLayout, isIgnoreExceptions, setConfiguration, setIgnoreExceptions, setLayout, setName, withConfiguration, withIgnoreExceptions, withLayout, withName
-
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable.Builder
asBuilder, getFilter, getPropertyArray, setFilter, setPropertyArray, withFilter
-
-
-
-
Method Detail
-
setStartAutomatically
public Log4jNullAppender.Builder setStartAutomatically(boolean startAutomatically)
Sets whether or not to start appenders automatically when callingbuild()
. The default istrue
.- Parameters:
startAutomatically
-true
to start appenders automatically, orfalse
otherwise.- Returns:
- This builder.
-
build
public Log4jNullAppender build()
Creates a newLog4jNullAppender
instance.- Returns:
- The created
Log4jNullAppender
instance.
-
-