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

Arakha updated LOG4J2-1931:
---------------------------
    Description: 
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:
   <RollingFile name="RollingFile" 
                         fileName="C:\temp\logs\2017-06-test\rollapp.log"
                 
filePattern="C:/temp/logs/${date:yyyy-MM}-test/rollapp-%d{yyyyMMdd}{UTC}-%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>

it may be related to fix done for : 
https://issues.apache.org/jira/browse/LOG4J2-1489



  was:
Wrong Date is calculated  for rollover filePattern with timezone parameter.
Example: 

"/temp/logs/${date:yyyy-MM}-test/rollapp-%d{yyyyMMdd}{UTC+0}-%i.log"

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:
   <RollingFile name="RollingFile" 
                         fileName="C:\temp\logs\2017-06-test\rollapp.log"
                 
filePattern="C:/temp/logs/${date:yyyy-MM}-test/rollapp-%d{yyyyMMdd}{UTC}-%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>

it may be related to fix done for : 
https://issues.apache.org/jira/browse/LOG4J2-1489




> 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:
>    <RollingFile name="RollingFile" 
>                        fileName="C:\temp\logs\2017-06-test\rollapp.log"
>                  
> filePattern="C:/temp/logs/${date:yyyy-MM}-test/rollapp-%d{yyyyMMdd}{UTC}-%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>
> it may be related to fix done for : 
> https://issues.apache.org/jira/browse/LOG4J2-1489



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to