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 Modifier and Type Field Description private booleanlogThrowables
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServletAppenderbuild()Builds the object after all configuration has been set.booleanisLogThrowables()Logs 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, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.logging.log4j.core.util.Builder
getErrorPrefix, isValid
-
-
-
-
Field Detail
-
logThrowables
@PluginBuilderAttribute private boolean logThrowables
-
-
Method Detail
-
build
public ServletAppender 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.
-
-