logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: time based file roller anomoly
Date Mon, 09 May 2016 15:22:19 GMT
Are you running on Windows?  We have had reports of similar behavior recently.  I would check
to see if something else is holding a lock on the file.  I believe the problem happens when
the rollover tries to rename the file. If it is locked the rename will fail. It will then
copy the file and then try to delete it. The delete also fails. Since we are still using File.delete
we don’t get any useful information on the failure so we don’t log anything.  I plan to
change that to use a newer API but that will only tell you there was a problem.


> On May 9, 2016, at 5:10 AM, Van Jaarsveldt, Charl <CVanJaarsveldt@dandh.com> wrote:
> Hi,
> We have a cluster of 16 machines, all running the same code with the same log4j2 config.
It has been logging fine for months, when suddenly – on May 1st – the original log file
stopped resetting on ONE of the machines, so since then the main log file has been growing
every day with the first log entry from 5/1. Everything else is still logging fine. I checked
the config, and it did not change on this one machine. Additionally, I restarted the service
on that machine on Friday, thinking it had something to do with the internal state of that
service, but the problem did not resolve.
> We’re using log4j 2.2. The next release will have it upgraded to the latest version,
but I’m hoping to identify the cause before then. Has anybody else seen anything like this?
> Here is the relevant part of the config:
> <RollingFile  name="mainLog"  fileName="logs/logfile.log"  filePattern="logs/logfile-%d{yyyy-MM-dd}_%i.log"
>                <PatternLayout  pattern="%date{yyyy-MM-dd HH:mm:ss.SSS}, [%thread],
%-5level, %logger{1}, - %message%n" />
>                <Policies>
>                                <TimeBasedTriggeringPolicy />
>                                <SizeBasedTriggeringPolicy size="200 MB"/>
>                </Policies>
>                <DefaultRolloverStrategy max="15" />
> </RollingFile>
> Thank you.
> Charl
> NOTICE: The foregoing message contains confidential information (including attachments)
intended only for the use of the addressee(s) named above. If you are not the addressee, or
the person responsible for delivering it to the addressee, you are hereby notified that reading,
disseminating, distributing, printing, or copying this message is strictly prohibited. If
you have received this message in error, please notify us by replying to the message immediately.
Please also proceed to delete the original message directly following your reply.   Not responsible
for typographical errors.  Prices subject to change without notice.  Prices for backordered
product are not guaranteed.   If you do not wish to receive future promotional announcements,
please reply to this email with "Remove" as your subject.

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

View raw message