Class SimpleLayout


  • public class SimpleLayout
    extends Layout
    Simple-layout.
    • Constructor Detail

      • SimpleLayout

        public SimpleLayout()
    • Method Detail

      • format

        public String format​(LoggingEvent theEvent)
        Implement this method to create your own layout format.
        Specified by:
        format in class Layout
        Parameters:
        theEvent - The LoggingEvent.
        Returns:
        The formatted LoggingEvent.
      • ignoresThrowable

        public boolean ignoresThrowable()
        If the layout handles the throwable object contained within LoggingEvent, then the layout should return false. Otherwise, if the layout ignores throwable object, then the layout should return true. If ignoresThrowable is true, the appender is responsible for rendering the throwable.

        The SimpleLayout, TTCCLayout, PatternLayout all return true. The XMLLayout returns false.

        Specified by:
        ignoresThrowable in class Layout
        Returns:
        true if the Layout ignores Throwables.