File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat log4j dosn't roll files as supposed to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat log4j dosn Watch "Tomcat log4j dosn New topic
Author

Tomcat log4j dosn't roll files as supposed to

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
i have in my tomcat web application log4j that is configured like this :


configured 100kb just to get quick test results , any way it seams like log4j roll the log only once and each time he detects that he need to make roll it just changes the previous file name and keep outputting to the main log file , i set log4j debug mode and the output it gives me looks like this :



as you can see it renaming me the myapp_gw.log.8 to myapp_gw.log.9 but doesn't keep the myapp_gw.log.8 ,
i need it to keep as i configured history of 15 files . what i need wrong here ?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Tomcat doesn't have anything to do with this. When applications log, they take full responsibility for their own logging.

Here's an appender config that works for me, though:


Customer surveys are for companies who didn't pay proper attention to begin with.
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hi and thanks for the reply , well from what i see your configuration is like my . except i dont need time based rolling only size of file based rolling
and this configuration used to work before very well i dont know why in this tomcat web app it acting like this .
also the logging doesn't give me much info
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Tomcat log4j dosn't roll files as supposed to