Package org.apache.log4j.layout
Class Log4j1SyslogLayout.Builder<B extends Log4j1SyslogLayout.Builder<B>>
java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout.Builder<B>
org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder<B>
org.apache.log4j.layout.Log4j1SyslogLayout.Builder<B>
- Type Parameters:
B- the builder type
- All Implemented Interfaces:
Builder<Log4j1SyslogLayout>
- Enclosing class:
Log4j1SyslogLayout
public static class Log4j1SyslogLayout.Builder<B extends Log4j1SyslogLayout.Builder<B>>
extends AbstractStringLayout.Builder<B>
implements Builder<Log4j1SyslogLayout>
Builds a SyslogLayout.
The main arguments are
- facility: The Facility is used to try to classify the message.
- includeNewLine: If true a newline will be appended to the result.
- escapeNL: Pattern to use for replacing newlines.
- charset: The character set.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Facilityprivate booleanprivate booleanprivate Layout<? extends Serializable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the object after all configuration has been set.Layout<? extends Serializable> booleanbooleanisHeader()setFacility(Facility facility) setFacilityPrinting(boolean facilityPrinting) setHeader(boolean header) setMessageLayout(Layout<? extends Serializable> messageLayout) Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder
getCharset, getFooterSerializer, getHeaderSerializer, setCharset, setFooterSerializer, setHeaderSerializerMethods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout.Builder
asBuilder, getConfiguration, getFooter, getHeader, setConfiguration, setFooter, setHeaderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.util.Builder
getErrorPrefix, isValid
-
Field Details
-
facility
-
facilityPrinting
-
header
-
messageLayout
-
-
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 Log4j1SyslogLayout.Builder<B>>- Returns:
- the configured instance.
-
getFacility
-
isFacilityPrinting
public boolean isFacilityPrinting() -
isHeader
public boolean isHeader() -
getMessageLayout
-
setFacility
-
setFacilityPrinting
-
setHeader
-
setMessageLayout
-