logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1149) PatternLayout predefined date pattern with time zone always renders default date format
Date Sun, 04 Oct 2015 17:37:26 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942730#comment-14942730
] 

Remko Popma commented on LOG4J2-1149:
-------------------------------------

The combination of a pattern name (like DEFAULT, ISO8601, COMPACT, ABSOLUTE) with a time zone
is not correctly handled. The {{FixedDateFormat.createIfSupported}} method returns null to
signal it cannot handle the time zone, but FastDateFormat cannot handle the pattern name,
so DatePatternConverter falls back to the default date format.

The fix is to look up the pattern name even if {{FixedDateFormat.createIfSupported}} returned
null.

> PatternLayout predefined date pattern with time zone always renders default date format
> ---------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1149
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1149
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Pattern Converters
>    Affects Versions: 2.4
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.4.1
>
>
> The date pattern
> {code}
> "%d{ISO8601}{UTC}"
> {code}
> is rendered as the default date format (yyyy-MM-dd HH:mm:ss,SSS) instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message