You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2018/01/02 16:48:00 UTC
[jira] [Commented] (LOG4J2-2169) RollingFile date pattern issue
[ https://issues.apache.org/jira/browse/LOG4J2-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308349#comment-16308349 ]
Remko Popma commented on LOG4J2-2169:
-------------------------------------
Does this problem also happen with Log4j 2.10? There was some threading issue fixed in a date formatter in 2.8.1, which may be related.
> RollingFile date pattern issue
> ------------------------------
>
> Key: LOG4J2-2169
> URL: https://issues.apache.org/jira/browse/LOG4J2-2169
> Project: Log4j 2
> Issue Type: Question
> Affects Versions: 2.7
> Reporter: Claire Villard
>
> Hi,
> I run a Java app, with Log4J 2, on Linux (mainly CentOS) servers.
> Here is my configuration file:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration shutdownHook="disable" monitorInterval="30" status="trace">
> <Appenders>
> <RollingFile name="RollingFile" fileName="/data/logs/hazelcast.log" filePattern="/data/logs/hazelcast-%d{yyyy-MM-dd}{CET}-%i.log.gz">
> <PatternLayout>
> <Pattern>%d{yyyy-MM-dd HH:mm:ss}{CET} %-5p [%t] %C{2} (%F:%L) - %m%n</Pattern>
> </PatternLayout>
> <Policies>
> <SizeBasedTriggeringPolicy size="15MB" />
> <TimeBasedTriggeringPolicy />
> </Policies>
> <DefaultRolloverStrategy max="90"/>
> </RollingFile>
> </Appenders>
> <Loggers>
> <Root level="DEBUG">
> <AppenderRef ref="RollingFile"/>
> </Root>
> </Loggers>
> </Configuration>
> {code}
> On 1 of our servers, we observe, that sometimes the rolled files are not labeled correctly: the date is far in the future.
> For example, during the first week of December, 2017, we had:
> {code}
> -rw-r--r-- 1 hazelcast hazelcast 15M Dec 2 13:35 hazelcast-2058-01-24-1.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 15M Dec 2 19:15 hazelcast-2058-01-24-2.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 15M Dec 3 02:28 hazelcast-2058-01-24-3.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 15M Dec 3 12:04 hazelcast-2058-01-24-4.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 15M Dec 3 17:41 hazelcast-2058-01-24-5.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 3 22:54 hazelcast-2058-01-24-6.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 5.2M Dec 4 04:12 hazelcast-2058-01-24-7.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 4 12:08 hazelcast-2058-01-26-1.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 4 18:00 hazelcast-2058-01-26-2.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 4 23:50 hazelcast-2058-01-26-3.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 5 10:27 hazelcast-2058-01-26-4.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 5 15:58 hazelcast-2058-01-26-5.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 5 20:43 hazelcast-2058-01-26-6.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 6 05:43 hazelcast-2058-01-26-7.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 6 12:35 hazelcast-2058-01-26-8.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 6 17:59 hazelcast-2058-01-26-9.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 6 23:13 hazelcast-2058-01-26-10.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 14M Dec 7 09:11 hazelcast-2058-01-26-11.log.gz
> -rw-r--r-- 1 hazelcast hazelcast 13M Dec 7 09:26 hazelcast.log
> {code}
> The timestamps of the log lines inside the files are correct.
> Restarting the app without changing anything in the configuration or the environment solved the issue.
> It reappeared several times, without any periodicity.
> We did not managed to find a reason for that naming error.
> Any help would be greatly appreciated !
> Thanks in advance,
> Claire
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)