• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Is TOMCAT'S JULI logging levels broken on Linux?

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I'm pulling my hair out trying to get tomcat logging levels to work. If you're a Tomcat logging guru, please please help! I'm trying to use the java.util.logging as that's fine for my needs and don't want to switch to log4j if at all possible. Thanks in advanced! Here's my issue:

I have custom logging going by putting a logging.properties file in WEB-INF/classes per the tomcat logging reference docs. I get the custom logs that look like so: dispatch2008-01-31.log. However, when I try to lower the levels of logging I can't seem to get it below Level.INFO logging. HELP!

I haven't checked my jdk logging properties because that would defeat the whole purpose of being able to use log levels dynamically via Tomcat's JULI implementation. I know that it defaults to INFO level so I'm assuming that JULI may not be overriding that level of logging? But the docs say it does?
Apache Logging Reference for Tomcat 6
I've even tried deleting the my app's logging.properties and hacking the tomcat/conf/logging.properties. Even tried setting every damn entry to ALL! No dice. Here's an example of one stab at logging.properties as I had it in my WEB-INF/classes dir:

Here's both files:

tomcat/conf/logging.properties:


and here's the one I have in myapp_root/WEB-INF/classes:


When I try this:


Only the INFO gets logged! Ergh!!! I'm on linux:
Linux toshiba 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux using Kubuntu Gutsy (latest)
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I've just spent most the morning on this one! I seem to have it working, try putting:

.level = ALL

after your .handlers entry.
 
nico dotti
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks but I think that's what I've already been trying (see sample code in my last post). Did you put this in your project's WEB-INF/classes directory?
Did you have to edit any other files?

For clarity here's what I have in my project's logging.properties:

[ February 03, 2008: Message edited by: nico dotti ]
 
nico dotti
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just did some more testing and noticed I can definitely toggle SEVERE, WARNING, and INFO levels but no lower. Something else is obviously kicking in and preventing this. I have a complex env with flex2 stuff too, and I think that the commons-logging is possibly screwing me up in this area? I've been searching and hacking and searching and hacking some more - hopefully I'll figure this out otherwise I'll be stuck with only the three levels
 
Those are the largest trousers in the world! Especially when next to this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic