You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Zsolt Safrany (Jira)" <ji...@apache.org> on 2020/12/15 07:17:00 UTC
[jira] [Commented] (LOG4J2-1931) Wrong Date is calculated for
rollover filePattern with timezone parameter
[ https://issues.apache.org/jira/browse/LOG4J2-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17249528#comment-17249528 ]
Zsolt Safrany commented on LOG4J2-1931:
---------------------------------------
Please make filePattern respect the timezone. This bug makes setting a timezone for the log pattern pointless if you cannot set the same timezone for your filePattern.
> Wrong Date is calculated for rollover filePattern with timezone parameter
> --------------------------------------------------------------------------
>
> Key: LOG4J2-1931
> URL: https://issues.apache.org/jira/browse/LOG4J2-1931
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.8.2
> Environment: Windows 8
> Log4j2 2.8.2
> Reporter: Arakha
> Priority: Critical
>
> Wrong Date is calculated for rollover filePattern with timezone parameter.
> Due to {{\{UTC+0}}} calculated date is wrong.
> current date is : 20170602 but the calculated one while rolling over is : 20170601 , file name: rollapp-20170601-1.log
> Configurations used are:
> {code:xml}
> <RollingFile name="RollingFile"
> fileName="C:\temp\logs\2017-06-test\rollapp.log"
> filePattern="C:/temp/logs/${date:yyyy-MM}-test/rollapp-%d{yyyyMMdd}{UTC+0}-%i.log">
> <PatternLayout>
> <Pattern>%d{HH:mm:ss.SSS}{UTC+0} %p %c{1.} [%t] %m%n</Pattern>
> </PatternLayout>
> <Policies>
> <TimeBasedTriggeringPolicy />
> <SizeBasedTriggeringPolicy size="1 MB"/>
>
> </Policies>
> </RollingFile>
> {code}
> it may be related to fix done for : https://issues.apache.org/jira/browse/LOG4J2-1489
--
This message was sent by Atlassian Jira
(v8.3.4#803005)