Interface Layout

All Known Implementing Classes:
StandardLayout

public interface Layout
Base interface for all log message layouts. Layouts are responsible for formatting log events into strings.
  • Method Summary

    Modifier and Type
    Method
    Description
    Format a logging event into a string.
    default String
    Get the footer for this layout, if any.
    default String
    Get the header for this layout, if any.
    default boolean
    Check if this layout handles throwables.
  • Method Details

    • format

      String format(LoggingEvent event)
      Format a logging event into a string.
      Parameters:
      event - The logging event to format
      Returns:
      The formatted string
    • getHeader

      default String getHeader()
      Get the header for this layout, if any.
      Returns:
      Header string or null if no header
    • getFooter

      default String getFooter()
      Get the footer for this layout, if any.
      Returns:
      Footer string or null if no footer
    • ignoresThrowable

      default boolean ignoresThrowable()
      Check if this layout handles throwables.
      Returns:
      true if layout includes throwable information