Class MySampleLayout2

    • Field Detail

      • prefix

        java.lang.String prefix
      • printThreadName

        boolean printThreadName
    • Constructor Detail

      • MySampleLayout2

        public MySampleLayout2()
    • Method Detail

      • setPrefix

        public void setPrefix​(java.lang.String prefix)
      • setPrintThreadName

        public void setPrintThreadName​(boolean printThreadName)
      • 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.

        Parameters:
        event - The event to format
        Returns:
        the event formatted as a String