Log4j 2
  1. Log4j 2
  2. LOG4J2-107

Nesting pattern layout options is broken

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta2
    • Fix Version/s: 2.0-beta3
    • Component/s: Layouts
    • Labels:
      None
    • Environment:

      Description

      This pattern:

      <PatternLayout pattern="%highlight{%d{dd MMM yyyy HH:mm:ss,SSS}{GMT+0} [%t] %-5level: %msg%n%throwable}" />
      

      Incorrectly outputs:

      02 Nov 2012 16:51:14,907{GMT+0 [main] FATAL: Fatal message.
      }02 Nov 2012 16:51:14,910{GMT+0 [main] ERROR: Error message.
      }02 Nov 2012 16:51:14,914{GMT+0 [main] WARN : Warning message.
      }02 Nov 2012 16:51:14,917{GMT+0 [main] INFO : Information message.
      }02 Nov 2012 16:51:14,920{GMT+0 [main] DEBUG: Debug message.
      }02 Nov 2012 16:51:14,924{GMT+0 [main] TRACE: Trace message.
      }02 Nov 2012 16:51:14,929{GMT+0 [main] ERROR: Error message.
      

        Activity

        Hide
        Ralph Goers added a comment -

        Are you looking into this or do you want me to do it? I believe this is handled in extractOptions in PatternParser.

        Show
        Ralph Goers added a comment - Are you looking into this or do you want me to do it? I believe this is handled in extractOptions in PatternParser.
        Hide
        Gary Gregory added a comment -

        Please look into it.

        Show
        Gary Gregory added a comment - Please look into it.
        Hide
        Ralph Goers added a comment -

        Fixed in revision 1405299. Please verify and close.

        Show
        Ralph Goers added a comment - Fixed in revision 1405299. Please verify and close.
        Hide
        Gary Gregory added a comment -

        Works like a charm. Thank you.

        Show
        Gary Gregory added a comment - Works like a charm. Thank you.

          People

          • Assignee:
            Unassigned
            Reporter:
            Gary Gregory
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development