Joseph Ottinger recently posted an informational piece, Logging API Choices on TheServerSide.com.
What amazed me about this piece was the fact there were over 30 comments in less than 24 hours. Obviously this is an issue of interest to many people. I wonder why.
With the exception of a very small percentage of applications where formal auditing is required, the main reason for logging is to help with debugging. One commenter estimates that 90% of logging is used for debugging, which I would even suggest is on the low side. Does it really matter which logger we use? Clearly, people find this to be an interesting topic, but I wonder whether this is really what we should be focusing on. Does it add business value? No. Does it add anything to the application for the user? No. Does it increase skill sets for developers? No.
The volume of comments is a testament to the generally accepted view that programming is difficult and rarely goes to plan.
How many managers have time budgeted for ‘reviewing logs’ in the project plan? Yet, it happens almost daily, on every project. Also, it would be interesting to discover the number of ‘logging’ lines of code as a percentage of your application (or per KLOC) and to compare the areas of logging to entries in your bug tracking system to determine if there is a correlation between logging and buggy code.
Rather than spend time discussing which logger to use, I would think it would be better for teams to discuss why the logging is there in the first place. It could be an indication that the code is too complex and could benefit from refactoring.

Recent Comments