Class ServletAppender.Builder<B extends ServletAppender.Builder<B>>
java.lang.Object
org.apache.logging.log4j.core.filter.AbstractFilterable.Builder<B>
org.apache.logging.log4j.core.appender.AbstractAppender.Builder<B>
org.apache.logging.log4j.web.appender.ServletAppender.Builder<B>
- All Implemented Interfaces:
Builder<ServletAppender>
- Enclosing class:
ServletAppender
public static class ServletAppender.Builder<B extends ServletAppender.Builder<B>>
extends AbstractAppender.Builder<B>
implements Builder<ServletAppender>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the object after all configuration has been set.booleanLogs withServletContext.log(String, Throwable)if true and withServletContext.log(String)if false.voidsetLogThrowables(boolean logThrowables) Logs withServletContext.log(String, Throwable)if true and withServletContext.log(String)if false.Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender.Builder
getConfiguration, getLayout, getName, getOrCreateLayout, getOrCreateLayout, isIgnoreExceptions, setConfiguration, setIgnoreExceptions, setLayout, setName, withConfiguration, withIgnoreExceptions, withLayout, withNameMethods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable.Builder
asBuilder, getFilter, getPropertyArray, setFilter, setPropertyArray, withFilter
-
Field Details
-
logThrowables
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
buildin interfaceBuilder<B extends ServletAppender.Builder<B>>- Returns:
- the configured instance.
-
isLogThrowables
public boolean isLogThrowables()Logs withServletContext.log(String, Throwable)if true and withServletContext.log(String)if false.- Returns:
- whether to log a Throwable with the servlet context.
-
setLogThrowables
public void setLogThrowables(boolean logThrowables) Logs withServletContext.log(String, Throwable)if true and withServletContext.log(String)if false.
-