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>
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServletAppender
build()
Builds the object after all configuration has been set.boolean
isLogThrowables()
Logs withServletContext.log(String, Throwable)
if true and withServletContext.log(String)
if false.void
setLogThrowables(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, withConfiguration, withIgnoreExceptions, withLayout, withName
-
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable.Builder
asBuilder, getFilter, withFilter
-
-
-
-
Method Detail
-
build
public ServletAppender build()
Description copied from interface:Builder
Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
build
in 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.
-
-