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 Glenn Holmer <gh...@weycogroup.com> on 2006/03/23 17:01:11 UTC

roller doesn't roll

I've got several apps using a RollingFileAppender, but one keeps 
overwriting the first file instead of rolling over to .1, .2, .3, etc.  
He is a web app running under Tomcat, and this is how he is configured:

log4j-1.2.9.jar is in /WEB-INF/classes of the webapp
config file is in /WEB-INF/classes/com/weycogroup/...
PropertyConfigurator is called in a ServletContextListener

this is his config file:

log4j.rootCategory=INFO, roller

log4j.appender.roller=org.apache.log4j.RollingFileAppender
log4j.appender.roller.File=/var/log/xxxxx.log

log4j.appender.roller.MaxFileSize=10240KB
log4j.appender.roller.MaxBackupIndex=10

log4j.appender.roller.layout=org.apache.log4j.PatternLayout
log4j.appender.roller.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} 
%-5p %c{1} %M:%L %m%n

I created all eleven files in /var/log and gave Tomcat permission to 
write to them.  Logging works normally except for the roller not 
rolling.  What have I done wrong?

-- 
____________________________________________________________
Glenn Holmer                          gholmer@weycogroup.com
Software Engineer                        phone: 414-908-1809
Weyco Group, Inc.                          fax: 414-908-1601

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


Re: roller doesn't roll

Posted by Javier Gonzalez <ja...@gmail.com>.
Try not creating any files (but the directory must be writable by tomcat)

On 3/23/06, Glenn Holmer <gh...@weycogroup.com> wrote:
>
> I've got several apps using a RollingFileAppender, but one keeps
> overwriting the first file instead of rolling over to .1, .2, .3, etc.
> He is a web app running under Tomcat, and this is how he is configured:
>
> log4j-1.2.9.jar is in /WEB-INF/classes of the webapp
> config file is in /WEB-INF/classes/com/weycogroup/...
> PropertyConfigurator is called in a ServletContextListener
>
> this is his config file:
>
> log4j.rootCategory=INFO, roller
>
> log4j.appender.roller=org.apache.log4j.RollingFileAppender
> log4j.appender.roller.File=/var/log/xxxxx.log
>
> log4j.appender.roller.MaxFileSize=10240KB
> log4j.appender.roller.MaxBackupIndex=10
>
> log4j.appender.roller.layout=org.apache.log4j.PatternLayout
> log4j.appender.roller.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
> %-5p %c{1} %M:%L %m%n
>
> I created all eleven files in /var/log and gave Tomcat permission to
> write to them.  Logging works normally except for the roller not
> rolling.  What have I done wrong?
>
> --
> ____________________________________________________________
> Glenn Holmer                          gholmer@weycogroup.com
> Software Engineer                        phone: 414-908-1809
> Weyco Group, Inc.                          fax: 414-908-1601
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
Javier González Nicolini