Class Log4j1SyslogLayout.Builder<B extends 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.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public Log4j1SyslogLayout 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 interface Builder<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()
      • setFacility

        public B setFacility​(Facility facility)
      • setFacilityPrinting

        public B setFacilityPrinting​(boolean facilityPrinting)
      • setHeader

        public B setHeader​(boolean header)
      • setMessageLayout

        public B setMessageLayout​(Layout<? extends java.io.Serializable> messageLayout)