My Oracle Support Banner

Log4j Rollingfileappender Behaviour With Weblogic on Windows (Doc ID 1374885.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3.2 and later   [Release: and later ]
Generic Windows

Symptoms

After deploying on WebLogic an application where Log4j RollingFileAppender class is used
the logging works as expected : files rotate when their limit is reached and backups are kept.

Here a sample of log4j configuration:

<appender name="TEST_APPENDER" class="org.apache.log4j.RollingFileAppender">
<param name="Threshold" value="debug"/>
<param name="File" value="D:/Oracle_env/user_projects/domains/base_domain/applications/logs/TestLogger.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="1KB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="conversionPattern" value="%d %-5p %c %x - %m%n"/>
</layout>
</appender>



But once the Admin Console is accessed the behaviour of the RollingFileAppender changes : the log file rotation doesn't work anymore only one occurence of the file is kept.

This happens only on Microsoft Windows machines.



Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
  Symptoms
  Cause
  Solution
  References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.