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 AbstractAppender.Builder
getConfiguration, getErrorPrefix, getLayout, getName, getOrCreateLayout, getOrCreateLayout, isIgnoreExceptions, setConfiguration, setIgnoreExceptions, setLayout, setName, withConfiguration, withIgnoreExceptions, withLayout, withNameMethods inherited from class AbstractFilterable.Builder
asBuilder, getFilter, getPropertyArray, setFilter, setPropertyArray, withFilterMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
getErrorPrefix, isValid
-
Field Details
-
logThrowables
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
-
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.
-