hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Davies" <juliusdav...@gmail.com>
Subject Re: [HttpClient] Logging wars revisited
Date Sat, 17 Mar 2007 14:02:57 GMT
I'd never looked at SLF4J before.  Thanks for pointing me at it this
morning, Oleg.  It looks really nice.  Like, really, really, nice.

Interesting to note that discussions on the SLF4J-Dev mailing list
have a number of Apache-related people participating:

John E. Conlon
Ceki Gülcü
Jacob Kjome
Jukka Zitting
Trustin Lee
etc....


This is also interesting:

<blockquote>
SLF4J offers a JCL binding, found in the file slf4j-jcl.jar. The JCL
binding will delegate all logging calls made through SLF4J API to JCL.
Thus, if for some reason an existing application must use JCL, your
part of that application can still code against the SLF4J API in a
manner transparent to the larger application environment.
</blockquote>


To me there are two good things about SLF4j:

* Solves the same problem as JCL, but without the complexity:
http://www.slf4j.org/pipermail/dev/2007-February/000810.html

* Much nicer to use in the application:

logger.debug("Temperature set to {}. Old temperature was {}.", t, oldT);


java.util.logging kind of supports #2, but it's not as pleasant.

logger.log(Level level, String msg, Object[] params)


yours,

Julius


On 3/17/07, Ortwin Glück <odi@odi.ch> wrote:
> Hi Oleg,
>
> That's interesting news.
> In my opinion we should offer our users the best possible compatibility
> and interoperability. That means if the world uses JCL we should use it
> as well. HttpClient is, after all, just yet another library. I think we
> do best if we use the same logging toolkit that our most prominent and
> most important users are using: Axis, JBoss, HtmlUnit etc. We should
> avoid using an exotic logging toolkit.
>
> Odi
>
> Oleg Kalnichevski wrote:
> > Folks,
> >
> > According to the recent discussions on the Commons-Dev list it appears
> > that Commons Logging is not going to be actively developed further, JCL
> > 2.0 is very unlikely to happen and those projects that rely on Java 1.4
> > or newer are advised to migrate to java.util.logging API.
> >
> > http://www.nabble.com/Re%3A-Commons-Logging-deprecated--was-Re%
> > 3A--logging--1.1.1-release--p9427138.html
> >
> > That poses a question whether we should revisit our decision to continue
> > using JCL for HttpClient 4.0 or should consider migrating to another
> > logging toolkit.
> >
> > My personal preference for JCL over SLF4J was based on the premise (1)
> > we ought to eat our own dog food (2) JCL was actively developed. Since
> > that no longer appears to be the case I am not sure sticking to JCL in
> > the long run gives us any benefits.
> >
> > How do you all feel about it? Shall we once again discuss our options
> > and reconsider the choice of a logging toolkit for HttpClient 4.0?
> >
> > Please make your opinion known
> >
> > Evil Comrade Oleg
> >
> > PS: All this makes me very happy HttpCore is not dependent on any
> > logging toolkit
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
>
>


-- 
yours,

Julius Davies
416-652-0183
http://juliusdavies.ca/

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message