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
Fields Modifier and Type Field Description private Facilityfacilityprivate booleanfacilityPrintingprivate booleanheaderprivate Layout<? extends java.io.Serializable>messageLayout
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Log4j1SyslogLayoutbuild()Builds the object after all configuration has been set.FacilitygetFacility()Layout<? extends java.io.Serializable>getMessageLayout()booleanisFacilityPrinting()booleanisHeader()BsetFacility(Facility facility)BsetFacilityPrinting(boolean facilityPrinting)BsetHeader(boolean header)BsetMessageLayout(Layout<? extends java.io.Serializable> messageLayout)-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder
getCharset, getFooterSerializer, getHeaderSerializer, setCharset, setFooterSerializer, setHeaderSerializer
-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout.Builder
asBuilder, getConfiguration, getFooter, getHeader, setConfiguration, setFooter, setHeader
-
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
-
facility
@PluginBuilderAttribute private Facility facility
-
facilityPrinting
@PluginBuilderAttribute private boolean facilityPrinting
-
header
@PluginBuilderAttribute private boolean header
-
messageLayout
@PluginElement("Layout") private Layout<? extends java.io.Serializable> messageLayout
-
-
Method Detail
-
build
public Log4j1SyslogLayout 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
public Facility getFacility()
-
isFacilityPrinting
public boolean isFacilityPrinting()
-
isHeader
public boolean isHeader()
-
getMessageLayout
public Layout<? extends java.io.Serializable> getMessageLayout()
-
setFacilityPrinting
public B setFacilityPrinting(boolean facilityPrinting)
-
setHeader
public B setHeader(boolean header)
-
-