Tidy up your Java logging 1
The logging libraries provided with Java 5 and above are pretty good, except they produce output that is almost unreadable. For example, consider the simplest example:
Logger logger = Logger.getLogger("PushServer"); logger.log(Level.SEVERE, "This is a sample message");
That produces the following log entry, on your screen and/or in a file:
Sep 28, 2009 9:30:48 PM javaloggersample.Main main SEVERE: This is a sample message
Individually, that's OK, but 20 messages? Messy. 1000 messages? Pretty nasty. 100 threads each generating a stream of FINE messages? Yikes.
CodeSpaces.com
Code Spaces is an online development and collaboration service that includes: Subversion Hosting, Project Management, Work Items, Forums, and much more.
Links
Categories
Tags
Archives
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009