I created an HttpCore ticket to get started:
I can do the port for Core and the other components if the community agrees
that it is a good thing.
On Fri, Sep 30, 2016 at 2:50 PM, Gary Gregory <garydgreg...@gmail.com>
> On Fri, Sep 30, 2016 at 1:15 AM, Julian Sedding <jsedd...@apache.org>
>> Hi all
>> I am not familiar with log4j2, but have used slf4j extensively over
>> the last years.
>> As I understand log4j2 clearly separates its API from the
>> implementation. If this is true, are there any major benefits to using
>> the log4j2 API over the slf4j API?
>> If this is not the case, and the benefits of log4j2 are predominantly
>> in the implementation, then it may be sensible to code against the
>> slf4j API and leave the choice of the implementation to the
>> deployment. I.e. it would be possible to use log4j2 as the logging
>> implementation via its slf4j binding.
> From the Log4j 2 FAQ [https://logging.apache.org/log4j/2.x/faq.html#api-
> The Log4j 2 API and SLF4J have a lot in common. They both share the
> objective of cleanly separating the logging API from the implementation. We
> believe that the Log4j 2 API can help make your application more performant
> while offering more functionality and more flexibility.
> There may be a concern that using the Log4j 2 API will tightly couple your
> application to Log4j 2. This is not the case: applications coded to the
> Log4j 2 API always have the option to use any SLF4J-compliant library as
> their logging implementation with the log4j-to-slf4j adapter. See the which
> <https://logging.apache.org/log4j/2.x/faq.html#which_jars_log4j-to-slf4j> FAQ
> entry for details.
> There are several advantages to using the Log4j 2 API:
> - SLF4J forces your application to log Strings. The Log4j 2 API
> supports logging any CharSequence if you want to log text, but also
> supports logging any Object as is. It is the responsibility of the logging
> *implementation* to handle this object, and we consider it a design
> mistake to limit applications to logging Strings.
> - The Log4j 2 API offers support for logging Message objects
> <https://logging.apache.org/log4j/2.x/manual/messages.html>. Messages
> allow support for interesting and complex constructs to be passed through
> the logging system and be efficiently manipulated. Users are free to create
> their own Message types and write custom Layouts, Filters and Lookups to
> manipulate them.
> - The Log4j 2 API has support for Java 8 lambda expressions
> - The Log4j 2 API has better support for garbage-free logging
> <https://logging.apache.org/log4j/2.x/manual/garbagefree.html>: it
> avoids creating vararg arrays and avoids creating Strings when logging
> CharSequence objects.
> I'm not interested in porting the the HC code from ACL to Slf4j, but I'll
> do the port to Log4j2 ;-)
>> I am sure others, especially Gary, can provide more qualified opinions
>>  https://logging.apache.org/log4j/2.0/log4j-slf4j-impl/index.html
>> On Thu, Sep 29, 2016 at 10:00 PM, Oleg Kalnichevski <ol...@apache.org>
>> > On Thu, 2016-09-29 at 09:27 +0530, Asankha C. Perera wrote:
>> >> Hi Oleg
>> > ...
>> >> > Should be remain faithful to Commons Logging or shall we finally
>> >> > to SLF4J?
>> >> I agree with Gary that Log4J2 is better than SLF4J too. Since we also
>> >> have Gary's experience and support to move to it, I think that maybe
>> >> best option.
>> >> regards
>> >> asankha
>> > Gary, Asankha
>> > Being a happy user of Log4J2 myself I would be very much in favor of
>> > using it directly. However we ought not impose a particular choice of
>> > the logging toolkit upon all our users. We should be using a logging
>> > bridge. This essentially leaves with two options: Commons Logging or
>> > SLF4J, both of which can use different backends including Log4J2.
>> > Oleg
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
>> > For additional commands, e-mail: dev-h...@hc.apache.org
>> To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
>> For additional commands, e-mail: dev-h...@hc.apache.org
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
JUnit in Action, Second Edition
Spring Batch in Action