• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat log4j dosn't roll files as supposed to

 
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
My cellmate was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic