You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2012/09/09 07:47:07 UTC

[jira] [Resolved] (LOG4J2-81) PatternLayout appender not respecting format modifiers

     [ https://issues.apache.org/jira/browse/LOG4J2-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers resolved LOG4J2-81.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-alpha3
         Assignee: Ralph Goers

When I incorporated the EnhancedPatternLayout from LOG4J1 I missed taking into account the FormattingInfo objects and their format method was not being called. I've fixed that in revision 1382402. Please test and close after verifying the fix.
                
> PatternLayout appender not respecting format modifiers
> ------------------------------------------------------
>
>                 Key: LOG4J2-81
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-81
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.0-alpha2
>         Environment: not applicable
>            Reporter: Bob G
>            Assignee: Ralph Goers
>            Priority: Minor
>             Fix For: 2.0-alpha3
>
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org