Opinions on Logging
In my code, I tend to do a lot of logging. Especially now that I have discovered Log4j. This allows me to log my statements to a text file instead of printing them all out to the console. Which may or may not be an option depending on the application.
Scott Ellsworth has written a blog article detailing reasons why he feels that logging can be a very usefull tool for debugging code. He also offers up several guidelines for the proper use of logging statements. According to his guidelines, I definitely use way too many logging statements. On the other hand, I am still learning and I am sure as I gain more experience this will decrease. Anyway, check out the article, it is an excellent read for any Java programmer.http://weblogs.java.net/pub/wlg/1886