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:
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)
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.
Joined: Oct 09, 2007
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 ]
Joined: Oct 09, 2007
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