Sunday, July 17, 2005

How to handle logging in portlets?

There are several ways to go about this and one can choose the approach according to ones taste and organizational standards.

At high level below are some of the logging options.

1. Good old System.out but use this only during initial development phase. Plan on converting this to some logging framework as soon as possible. You can either do global replace all or use a free eclipse plugin, log4e, to convert to log4j statements.

2. Jakarta Log4j which seems to be the industry standard.

3. JDK 1.4 logging apis.

4. Simple Log from java.net

5. Websphere logging apis which is my preference.

There must be several more open source, vendor propritery, and in-house developed logging framework.

I will continue with this article with my experience on using log4j, system.out and websphere apis as soon as i collect my thoughts on this.

No comments: