You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "NamHyoekJoon (Jira)" <ji...@apache.org> on 2023/03/11 18:41:00 UTC

[jira] [Updated] (LOG4J2-3654) The date of the file pattern is displayed as the date of the previous day.

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

NamHyoekJoon updated LOG4J2-3654:
---------------------------------
    Description: 
!image-2023-03-12-03-35-04-729.png!

!image-2023-03-12-03-33-48-213.png!

 

 
{code:java}
<RollingFile name="DefaultAppender" fileName="${sys:LOG_PATH}/${sys:DEFAULT_LOG_NAME}" filePattern="./log/backup/default/app2-%d{yyyy-MM-dd HH:mm:ss}.log.gz"> 
<PatternLayout pattern="${sys:FILE_LOG_PATTERN}"/> 
<Policies> 
<CronTriggeringPolicy schedule="0 33 18 * * ? *" /> 
<SizeBasedTriggeringPolicy size="10 MB" /> 
</Policies> 
</RollingFile> {code}
Photo tested with TimeZone removed.

My server time is UTC, pointing at 18:00 on March 11th.

However, the title of the actual rolled file refers to "March 10".

is this a bug?

  was:
!image-2023-03-12-03-35-04-729.png!

!image-2023-03-12-03-33-48-213.png!

 

 
{code:java}
<RollingFile name="DefaultAppender" fileName="${sys:LOG_PATH}/${sys:DEFAULT_LOG_NAME}" filePattern="./log/backup/default/app2-%d{yyyy-MM-dd HH:mm:ss}.log.gz"> <PatternLayout pattern="${sys:FILE_LOG_PATTERN}"/> <Policies> <!--<CronTriggeringPolicy schedule="0 0 0 * * ? *" />--> <CronTriggeringPolicy schedule="0 33 18 * * ? *" /> <SizeBasedTriggeringPolicy size="10 MB" /> </Policies> </RollingFile> {code}
Photo tested with TimeZone removed.

My server time is UTC, pointing at 18:00 on March 11th.

However, the title of the actual rolled file refers to "March 10".

is this a bug?


> The date of the file pattern is displayed as the date of the previous day.
> --------------------------------------------------------------------------
>
>                 Key: LOG4J2-3654
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3654
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Pattern Converters
>    Affects Versions: 2.20.0
>         Environment: java 17
> Spring boot 2.7.9
> log4j2 2.20
>            Reporter: NamHyoekJoon
>            Priority: Major
>         Attachments: image-2023-03-12-03-33-48-213.png, image-2023-03-12-03-35-04-729.png
>
>
> !image-2023-03-12-03-35-04-729.png!
> !image-2023-03-12-03-33-48-213.png!
>  
>  
> {code:java}
> <RollingFile name="DefaultAppender" fileName="${sys:LOG_PATH}/${sys:DEFAULT_LOG_NAME}" filePattern="./log/backup/default/app2-%d{yyyy-MM-dd HH:mm:ss}.log.gz"> 
> <PatternLayout pattern="${sys:FILE_LOG_PATTERN}"/> 
> <Policies> 
> <CronTriggeringPolicy schedule="0 33 18 * * ? *" /> 
> <SizeBasedTriggeringPolicy size="10 MB" /> 
> </Policies> 
> </RollingFile> {code}
> Photo tested with TimeZone removed.
> My server time is UTC, pointing at 18:00 on March 11th.
> However, the title of the actual rolled file refers to "March 10".
> is this a bug?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)