hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Using SLF4J as a logging facade; Re: Disagreement on Log4J2
Date Fri, 01 Dec 2017 09:09:05 GMT

It is going to be unpleasant but we need to revisit a highly
contentious issue of the choice of a logging APIs for HttpClient 5.0.

I personally like Log4J2 and generally am a satisfied user of the
toolkit. However, Log4J2 logging facade APIs did accumulate a lot of
stuff that in my opinion should not have been there in the first place.
 This bothers me.

A more immediate problem with Log4J2, though, is that its logging APIs
do not play nicely with Android. Whether or not this is Log4J2 fault is
not for me to say but presently HttpClient 5.0 is incompatible with
Android due to its dependency on Log4J2 logging APIs. It is also
unclear whether this incompatibility could be resolved and when. See LO
G4J2-2133 [1] for details. 
At this point while HttpClient 5.0 is still ALPHA we could switch to
SLF4J and personally think we should. Log4J2 would still be the
preferred and the default toolkit for HttpClient 5.0 though the logging
interface would be SLF4J, not Log4J2 logging APIs.  

Please share your thoughts.


[1] https://issues.apache.org/jira/browse/LOG4J2-2133

On Wed, 2017-05-03 at 11:19 +0200, Michael Osipov wrote:
> Hi folks,
> it recently has come to my attention that Commons Logging has been 
> replaced with Log4J2. Well, I proposed almost two years ago to move
> to 
> SLF4J for good reasons [1].
> People disagreed that Commons Logging is good enough and this
> discussion 
> has been held several times w/o any concensus. Since people also 
> disgreed this time, I obstained to changed the code even if I
> disagree 
> with the consent.
> Some time back Oleg raised the same question on the dev mailing list 
> [2]. The already existing ticket wasn't even put into consideration
> to 
> inform all subscribers. Some discussion was held on the mailing
> list. 
> The ticket [3] was created w/o any proper description, proposal and 
> linking to any concensus and boom, a day later it was committed.
> As Oleg expressed here [4] a lot of users will be pissed off why
> they 
> need now a new facade for a facade to do logging. Infact, as for the 
> facade all/some the improvements could have landed in SLF4J after
> all.
> If someone wants to use Log4J2 as a logging backend that's perfectly
> fine.
> I am not really satisfied with the course of discussion and 
> documentation of this change. It could have been way better and will 
> leave a bad aftertaste. After all, the issue (list) should contain
> all 
> necessary information why a change was done. It simple hasn't been
> done. 
> I don't expect any client who is upgrading to search mailing lists
> for 
> such answers.
> At the end, people will add exclusions to their POM, add the SLF4J 
> bridge and log to whatever they want.
> Michael
> [1] https://issues.apache.org/jira/browse/HTTPCLIENT-1664
> [2] http://www.mail-archive.com/dev@hc.apache.org/msg16743.html
> [3] https://issues.apache.org/jira/browse/HTTPCLIENT-1786
> [4] http://www.mail-archive.com/dev@hc.apache.org/msg17847.html
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org

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

View raw message