Waffle log level

Jul 27, 2010 at 12:20 AM

When using my applications in production I normally set the log level to "info". I log configuration parameters and other stuff which is useful to know if someone sends me the log file because he is having some trouble.

I noticed that waffle (NegotiateSecurityFilter) is very chatty if I if use the info log level. For each login of a user, there are 12 info statements. After the user is authenticated, there are 3 additional info lines for each ressource. If my page contains 5 javascript files, there are 15 statements for the files for every call.

Obviously having this information is very useful, but I think mainly for debugging purposes. So I'm wondering, why is so much logged with the info level? The debug level is only rarely used. The used parameters otherwise - which are only initialized at startup - are logged with the debug level. In these I would be interessted in the info level.

It's no big deal, because I can of course add "log4j.logger.waffle.servlet=warn" to my logging configuration, but I'm wondering if there is a bigger reason to log so much with level info. I can only assume that in your product the default log level is "warn".

Coordinator
Jul 27, 2010 at 3:26 AM

As always, the reasons are historical. Basically I never gave it that deep of a thought :) Info level in my opinion logs enough detail to see what's happening - so you want to see which groups the user belongs to. Debug level is to troubleshoot.

Jul 27, 2010 at 8:12 AM
Edited Jul 27, 2010 at 8:16 AM

If you want to see which groups the user belongs to, you have to use the debug level :-)

In my opinion the info level contains not only enough detail, it contains too much detail. Otherwise the waffle.apache.NegotiateAuthenticator is much better in my opinion. There, only the successfully logged in user is logged with info level. The rest uses debug level. So, my suggestion would be to give it a deeper thought for a future version if each log statement uses the correct level and if it's consistent throughout the component.

Coordinator
Jul 27, 2010 at 12:53 PM

Sounds like you really care about this, which is great. Why don't you take the source code and modify the log levels to what you think they should be and upload a patch?

Jul 27, 2010 at 7:56 PM
I can try to do this. Is there a description somewhere how this works? I mean submitting a patch not changing the log levels of course ;-)
Coordinator
Jul 27, 2010 at 11:35 PM

There's a page in the WAFFLE docs about contributing. Get source code from SVN, make changes, run build and test the changes, attach a patch to an issue on CodePlex.