My log4j.properties is:

log4j.appender.R.File=../logs/xrzgather.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=100

I have many tomcat server run the application,and all of them run normal with the right log but one of them do not normal,it generate the log file:

    xrzgather.log  182M  
    xrzgather.log.19  254M  
    xrzgather.log.45  48.6M  
    xrzgather.log.50  400M  
    xrzgather.log.90  20.8M  
    xrzgather.log.92  66.3M  
    xrzgather.log.99  11.9M

Has anyone know what's wrong?

有帮助吗?

解决方案

I find the reason..
I config a Context element in %tomcat_home%\conf\Server.xml like this:

<Context path="xrz-gather" docBase="xrz-gather-web-1.0-SNAPSHOT" />

if I remove this,log will be normal.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top