RSS RSS feed | Atom Atom feed

Logging and Performance

ClassNotFound states that running a small app on Tomcat with org.apache.catalina package logging set to FINEST takes 10x longer to start up than if it's set to INFO.

This is a pet peeve of mine. Why on earth do so many developers integrate such verbose logging into their applications? I am very much an advocate of having terse logging that is meaningful. How many times have you seen a line of code followed by a line of logging? Insane I tell you!! If you extrapolate this out to a medium size project, think of the code bloat. Probably 40-50%, which is ridiculous. If you have to introduce that much logging to understand what is going on in your application, maybe refactoring the application would be a good place to start. Also, you could use this time more effectively by writing copious unit tests to help prove that your application works as expected. Without unit tests, the application's behavior may change from release to release.

Read more...

Tags :