Class LayoutAdapter

    • Constructor Detail

      • LayoutAdapter

        public LayoutAdapter​(Layout layout)
    • Method Detail

      • getFooter

        public byte[] getFooter()
        Description copied from interface: Layout
        Returns the format for the layout format.
        Specified by:
        getFooter in interface Layout<String>
        Returns:
        The footer.
      • getHeader

        public byte[] getHeader()
        Description copied from interface: Layout
        Returns the header for the layout format.
        Specified by:
        getHeader in interface Layout<String>
        Returns:
        The header.
      • toByteArray

        public byte[] toByteArray​(LogEvent event)
        Description copied from interface: Layout
        Formats the event suitable for display.
        Specified by:
        toByteArray in interface Layout<String>
        Parameters:
        event - The Logging Event.
        Returns:
        The formatted event.
      • toSerializable

        public String toSerializable​(LogEvent event)
        Description copied from interface: Layout
        Formats the event as an Object that can be serialized.
        Specified by:
        toSerializable in interface Layout<String>
        Parameters:
        event - The Logging Event.
        Returns:
        The formatted event.
      • getContentType

        public String getContentType()
        Description copied from interface: Layout
        Returns the content type output by this layout. The base class returns "text/plain".
        Specified by:
        getContentType in interface Layout<String>
        Returns:
        the content type.
      • getContentFormat

        public Map<String,​String> getContentFormat()
        Description copied from interface: Layout
        Returns a description of the content format.
        Specified by:
        getContentFormat in interface Layout<String>
        Returns:
        a Map of key/value pairs describing the Layout-specific content format, or an empty Map if no content format descriptors are specified.
      • encode

        public void encode​(LogEvent event,
                           ByteBufferDestination destination)
        Description copied from interface: Encoder
        Encodes the specified source object to some binary representation and writes the result to the specified destination.
        Specified by:
        encode in interface Encoder<LogEvent>
        Parameters:
        event - the object to encode.
        destination - holds the ByteBuffer to write into.