Skip to Content
0
Former Member
Oct 20, 2009 at 09:31 AM

Log4j / RollingFileAppender / Permission

1081 Views

Hi.

We use log4j to log from our application out to the same directory as the server logs. (ie j2ee/cluster/server0/logs)

It is currently configured with the RollingFileAppender and set to a backup of 5, with a size of 10Mb, as shown below.

log4j.appender.logfile=org.apache.log4j.RollingFileAppender

log4j.appender.logfile.File=/usr/sap/DTV/J00/j2ee/cluster/server0/log/log-local.log

log4j.appender.logfile.MaxFileSize=10MB

log4j.appender.logfile.MaxBackupIndex=5

log4j.appender.logfile.layout=org.apache.log4j.PatternLayout

log4j.appender.logfile.layout.ConversionPattern=%-5p %d [%t] %c: %m:%n

However, the file does not

a) RollOver - we have files that are nearly 800Mb in size now!

b) Backup - it never creates the backup

But it is logging the right level,etc, and uses the right location - so it cant be the log4j configuration

Are there any permissions that need to be set from a O/S level??

Any ideas welcome!!

Regards,

Andrew