I would like to do this using java.util.logging if possible, any ideas? thanks.
views:
337answers:
3It is plain better to NOT use java.util.Logging (JUL) as it is very slow. That being said,
if you must use JUL, you could try using Logback/slf4j. SLF4j includes a module that intercepts JUL and uses Logback instead (Logback is probably the fastest/best logger available.) You could also use xjuli, a log4j to JUL bridge.
If you can use other loggers I recommend using Logback directly over Log4j as Logback is written by the same person who did Log4j, but contains even faster code. (e.g. Logback = Log4j + lessons learned).
You could give a try at SLF4J.
Simple Logging Facade for Java (SLF4J)
The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time.