You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Carlsen, Rasmus" <ra...@cgi.com> on 2016/03/01 08:06:58 UTC

When the file is rolling, the original file is not reset

Hi
I use log4j 2.5 on weblogic 12C (By adding the argument -Dlog4j.Configuration=log4j2.xml) with one configurationfile that configure loggings for several deployed applications.

With the attached configuration file, the rollingfileappender role more or less as expected, but the original file is not reset. Therefore the original file just grow and grow, and so does the backup files as shown below.

[cid:image002.png@01D1738B.1851AFB0]

If I add append="false" it works as expected and the original file is reset on each role, but I do not want to clear the logfiles when the application startup.

[cid:image001.png@01D1738C.A501A860]


If I use the same configurationfile without append="false" when running unittests from eclipse the rolling works exactly as I would expect:

[cid:image003.png@01D1738D.109F8DD0]

Have you seen this before and can you give me a hint for a solution?

Regards, Rasmus Carlsen