Skip to main content

JXSE 2.5 : What's Cool #7 -- Logging

Posted by bondolo on October 14, 2007 at 12:37 PM PDT

JXSE (JXTA for Java SE/EE 5.0) 2.5 contains quite a number of exciting changes for JXTA application developers. This little series will look at a few of the important changes in the upcoming release.

One of the first major changes to occur in the JXSE 2.5 development cycle was our transition from Log4J to java.util.logging. I previously blogged here how we used Jackpot to do the conversion between the two APIs. The instigator of our transition to use java.util.logging was the Shoal project. Since all of Glassfish already used java.util.logging they quite reasonably didn't want a second logging framework, Log4J, in order to use JXTA. This concern has been an occasional, but common, observation by JXTA deployers ever since java.util.logging first appeared in JDK 1.4. We've planned on changing to java.util.logging "eventually" for quite a while. The gentle nudge, and the offer of testing assistance from the Shoal, finally made doing the conversion a priority.

Following the conversion to java.util.logging the JXSE community has struggled a bit with the transition. The control mechanisms for java.util.logging are somewhat different from the Log4J controls and certainly not as familiar. Most of the initial bumps have smoothed out over the last nine months as the wikis, FAQs and mailing list archives have accumulated our increasing experience with java.util.logging.

As with any significant change there are inevitably comprises. Leaving Jog4J meant we lost the use of Chainsaw though we gained significantly with the availability of a wide variety of JMX tools.

During the entire life of the JXSE project we've regularly received requests to entirely disable logging including permanently disabling logging by removing it from the compiled code. Generally the request is made for two reasons; to reduce the size of the JXSE jar or to make it harder for end users to disassemble proprietary JXTA-based applications. With the change to java.util.logging it is now possible to selectively disable logging. The instructions are available as part of the JXSE 2.5 Javadoc (Which will be here once the page is updated for JXSE 2.5).

Related Topics >>

Comments

<p>Excellent article , you have indeed covered topic in ...

Excellent article , you have indeed covered topic in details with code examples and explanation. I have also blogged some of my java logging experience as 10 tips on logging in Java
Thanks
Javin