Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-81

PatternLayout appender not respecting format modifiers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0-alpha2
    • 2.0-beta1
    • Layouts
    • None
    • 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)

      Attachments

        Activity

          People

            rgoers Ralph Goers
            bobtheghosts Bob G
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: