JULI - The java.util.logging Interface. We use it because Sun says we have to (and they certainly know what's best now don't they!).
Configuration
- A short Java Logging API tutorial - http://www.crazysquirrel.com/computing/java/logging.jspx
- An example of configuring Java Logging - http://www.exampledepot.com/egs/java.util.logging/Props.html
- Configuring logging in Tomcat 5.5 - http://tomcat.apache.org/tomcat-5.5-doc/logging.html
Alternatives to JULI
http://www.x4juli.net seems like a much more useful implementation of java.util.logging. See the feature comparison here: http://www.x4juli.net/features.html
Soap box
Sun's choice with the Java Logging API did not result in a very useful product. Why they chose not to use the existing (IMO, defacto standard) Log4J library and package it with the JDK is beyond my comprehension. Here is my list of gripes about the Java Logging API:
- FileHandler and ConsoleHandler are too simple to be useful in a real-life application.
- ConsoleHandler redirects to System.err? UGH! WTF!?!? This causes of at least one annoying problem.
- What's with all the levels? They are unnecessary! How does one decide whether to use FINE, FINER, or FINEST? Getting a group of programmers to agree to use DEBUG vs INFO is hard enough!
- No class loader level logging manager? Hello? Obviously this doesn't work well in an app server context.
- No async logging or other neato appenders that Log4J has. http://forum.java.sun.com/thread.jspa?threadID=738478&messageID=4239690
- Log4J is nearly ubiquitous. Every Java programmer I know uses Log4J. Why not just embrace it?
In summary, this is yet another POS from Sun. All I gotta say is "WTF Sun?"
See also
- http://java.sun.com/j2se/1.5.0/docs/guide/logging/overview.html - Overview
- http://www.ingrid.org/jajakarta/log4j/jakarta-log4j-1.1.3/docs/critique.html - What I feel is a fair critique of the Java Logging API
- http://www.x4juli.net - A more useful implementation of java.util.logging
- Routing java.util.logging messages to Log4J
- SLF4J - Simple Logging Facade for Java - This is a [Facade Pattern] library that covers up the details of [JCL], [JULI], [Log4J], etc. This one is used by [Quickfix-J].

Add Comment