Log4j 2
  1. Log4j 2
  2. LOG4J2-81

PatternLayout appender not respecting format modifiers

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha2
    • Fix Version/s: 2.0-beta1
    • Component/s: Layouts
    • Labels:
      None
    • Environment:

      not applicable

      Description

      Example pattern:
      [%d

      {yyyyMMdd HH:mm:ss,SSS}

      ] %-5p [%-25.25c

      {1}:%-4L] - %m%n

      Text output is:
      [20120907 14:18:36,875] INFO [XXXXXX...
      [20120907 14:18:36,875] INFO [XXXXXX...
      [20120907 14:18:36,965] ERROR [XXXXX...

      NOTE that "INFO" and "ERROR" are not left justified for 5 spaces (%-5p)


      The logger name ([%-25.25c{1}

      ) is not left justified or padded when there are less then 25 characters

      The line number is not left justified or padded either (%-4L)

        Activity

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Bob G
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development