• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

limit property not working properly in logging.properties file in tomcat

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
1catalina.org.apache.juli.FileHandler.limit = 20000000
1catalina.org.apache.juli.FileHandler.count = 5

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

---------------------------------------------------------------------------

I set these property in logging.properties file to rotate calaline.out file after 20 MB. but its not working .
How can i achieve this.
 
Bartender
Posts: 20836
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try it on a smaller size and see if the limit really isn't working or not.

One problem with numbers like "20MB" or "20000000" is that it can actually mean several different values, as disk drive manufacturers have been known to exploit.
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:Try it on a smaller size and see if the limit really isn't working or not.

One problem with numbers like "20MB" or "20000000" is that it can actually mean several different values, as disk drive manufacturers have been known to exploit.



I search solution for this problem, most of forums suggest to make a cron entry for that.
but in my case, catalina.out fills logs pretty fast. so i want to rotate catalina.out against its size limit.

thanks your suggestion.
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried several combination of limit but its not working file. my logs does not rotate.

1catalina.org.apache.juli.FileHandler.limit = 20000000

1catalina.org.apache.juli.FileHandler.limit = 20

1catalina.org.apache.juli.FileHandler.limit = 2

1catalina.org.apache.juli.FileHandler.limit = 200
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please update..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!