Class PatternLayout


  • public class PatternLayout
    extends Layout
    • Constructor Detail

      • PatternLayout

        public PatternLayout​(String pattern)
    • Method Detail

      • format

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

        public boolean ignoresThrowable()
        Description copied from class: Layout
        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.