You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@portals.apache.org by Ken Ramirez <kr...@thejavathinktank.org> on 2005/03/15 06:25:48 UTC

Logging Support (what's your choice?)

Hi Guys,

I'm currently hooking in logging support into the Gems portlets and was 
wondering what others thought about the choice between direct Log4 use, 
commons logging, and java.util.logging.

Most tend to go with the standard once it exist directly in the Java 
API. Java logging has been around now for awhile and is expected to be 
around in the future. On the other hand, I know that many open source 
projects have used commons.logging or log4j directly. If you were 
choosing from scratch in todays times, which would you choose?

Thanks,

-- 
*----*----*----*----*----*----*----*----*----*----*----*----
Stay on top of all things regarding JSR-168 Portlet and
Portal development by bookmarking the authority on the
subject: http://community.java.net/portlet
*
* News
* Weblogs
* Community Tips
* Portlet and Portal Projects
* Featured Articles
* And much more
*
*----*----*----*----*----*----*----*----*----*----*----*----
Ken Ramirez
Send mail to: mailto://kramirez@TheJavaThinkTank.org
Check out the website: http://www.TheJavaThinkTank.org
Check out my Blog at: http://weblogs.java.net/blog/ken_ramirez
*----*----*----*----*----*----*----*----*----*----*----*----


Re: Logging Support (what's your choice?)

Posted by Scott Heaberlin <he...@gmail.com>.
I'm not an apache comitter, but I do subscribe to a good number of
jakarta / apache mailing lists because of all the OSS we utilize at
work.  I can tell you that there are many, many ongoing discussions
regarding the choice between Jakarta Commons-logging (JCL) and log4j. 
In concept, JCL sounds like a good idea - a thin wrapper capable of
using whatever logging system is available - log4j, jdk1.4 logging,
Avalon LogKit, or with extension - possibly proprietary logging
systems (eg hooking in a third party library / package that utilizes
JCL into your own application's logging).

Unfortunately, as the log4j team (and others) have pointed out, JCL
seems to have some serious flaws in its chosen architecture.

The following are very interesting articles on this subject written by
the founder of log4j, Ceki Gulcu.
http://www.qos.ch/logging/thinkAgain.jsp
http://www.qos.ch/logging/classloader.jsp

I also found this blog entry interesting. It is by a
commons-httpclient committer discussing early work on commons-logging.
http://radio.weblogs.com/0122027/2003/08/15.html

A quick search of the log4j mailing list archives shows the many times
this question has come up in the log4j community:
log4j-user: 
http://marc.theaimsgroup.com/?l=log4j-user&w=2&r=1&s=commons+logging&q=b

log4j-dev: 
http://marc.theaimsgroup.com/?l=log4j-dev&w=2&r=1&s=JCL&q=b


Just my $0.02,

-Scott Heaberlin
Columbia, SC USA

Re: Logging Support (what's your choice?)

Posted by David Sean Taylor <da...@bluesunrise.com>.
TTelcik@hbf.com.au wrote:
> 
> Hello Ken,
> 
> I was never impressed with the native Java logging API as the logging 
> levels were not intuitive.
> 
> What does FINE, FINER, FINEST or CONFIG mean to a developer or 
> administrator ? Not much. Only INFO, WARNING and SEVERE make sense.
> 
> I prefer the Log4J standard of DEBUG for debugging and INFO for 
> configuration details. Far more intuitive. Log4j also supports more 
> logging adapters/appenders than the standard Java logging API.
> 
I still prefer using Log4J

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

Re: Logging Support (what's your choice?)

Posted by TT...@hbf.com.au.
Hello Ken,

I was never impressed with the native Java logging API as the logging 
levels were not intuitive. 

What does FINE, FINER, FINEST or CONFIG mean to a developer or 
administrator ? Not much. Only INFO, WARNING and SEVERE make sense.

I prefer the Log4J standard of DEBUG for debugging and INFO for 
configuration details. Far more intuitive. Log4j also supports more 
logging adapters/appenders than the standard Java logging API.

The Java logging API is almost a clone of IBM's Logging Toolkit for Java 
(JLOG). See "http://www.alphaworks.ibm.com/tech/loggingtoolkit4j".

You could play it safe and use the Apache Commons logging API, which wraps 
Log4j quite nicely.

You can also peruse a range of articles at the Log4j site, including this 
one ...

How does the Java logging API stack up against log4j? 
http://builder.com.com/5100-22-1046694.html


For my part, I just call out to Log4j directly. We're also still lumbered 
with JDK 1.3, so that also governs which API we use.


I'm sure opinions will vary.


Tim.

+++
Tim Telcik
Technical Application Architect
Business Systems Delivery
Information Technology Services, HBF, Inc.
Email: ttelcik@hbf.com.au
Tel: 9214 6744    Fax: 9214 6779





Ken Ramirez <kr...@thejavathinktank.org> 
15/03/2005 01:25 PM
Please respond to
"Portals Discussion" <ge...@portals.apache.org>


To
General Apache Portal List <ge...@portals.apache.org>
cc

Subject
Logging Support (what's your choice?)






Hi Guys,

I'm currently hooking in logging support into the Gems portlets and was 
wondering what others thought about the choice between direct Log4 use, 
commons logging, and java.util.logging.

Most tend to go with the standard once it exist directly in the Java 
API. Java logging has been around now for awhile and is expected to be 
around in the future. On the other hand, I know that many open source 
projects have used commons.logging or log4j directly. If you were 
choosing from scratch in todays times, which would you choose?

Thanks,

-- 
*----*----*----*----*----*----*----*----*----*----*----*----
Stay on top of all things regarding JSR-168 Portlet and
Portal development by bookmarking the authority on the
subject: http://community.java.net/portlet
*
* News
* Weblogs
* Community Tips
* Portlet and Portal Projects
* Featured Articles
* And much more
*
*----*----*----*----*----*----*----*----*----*----*----*----
Ken Ramirez
Send mail to: mailto://kramirez@TheJavaThinkTank.org
Check out the website: http://www.TheJavaThinkTank.org
Check out my Blog at: http://weblogs.java.net/blog/ken_ramirez
*----*----*----*----*----*----*----*----*----*----*----*----




============================================================
HBF Health Funds Inc. a registered organisation under the National Health Act
HBF Insurance Pty Ltd ACN  009 268 277
This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email.