Class TTLLLayout

  • All Implemented Interfaces:
    Layout<ILoggingEvent>, ContextAware, LifeCycle

    public class TTLLLayout
    extends LayoutBase<ILoggingEvent>
    This internal logback API is not supported by AEM as a Cloud Service.
    A layout with a fixed format. The output is equivalent to that produced by PatternLayout with the pattern:

    %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n

    TTLLLayout has the advantage of faster load time whereas PatternLayout requires roughly 40 milliseconds to load its parser classes. Note that the second run of PatternLayout will be much much faster (approx. 10 micro-seconds).

    Fixed format layouts such as TTLLLayout should be considered as an alternative to PatternLayout only if the extra 40 milliseconds at application start-up is considered significant.

    • Constructor Detail

      • TTLLLayout

        public TTLLLayout()
    • Method Detail

      • doLayout

        public java.lang.String doLayout​(ILoggingEvent event)
        Description copied from interface: Layout
        Transform an event (of type Object) and return it as a String after appropriate formatting.

        Taking in an object and returning a String is the least sophisticated way of formatting events. However, it is remarkably CPU-effective.

        event - The event to format
        the event formatted as a String