Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Romain Manni-Bucau
@Ralph: for tomcat you can use their SPI ( https://github.com/apache/meecrowave/blob/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/logging/tomcat/Log4j2Log.java). For tomee it is harder since tomee itself has an API (LogStream) but OWB and cxf uses JUL as API (as mentionned before) and

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Ralph Goers
Please point me at the doc for how TomEE would expect us to implement it. The doc for Tomcat is at https://tomcat.apache.org/tomcat-8.5-doc/logging.html , which indicates that implementing a Handler is the only option. If you have a better w

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Romain Manni-Bucau
@Ralph: not exactly, if you check tomee/meecowave/cxf, all have Logger implementations backed by something else. Integration is more or less good depending the requirements but extending logger you get an implementation almost as fast as a native log4j. It keeps JUL as API which also allows a depen

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Gary Gregory
On Tue, Sep 5, 2017 at 11:03 AM, Ralph Goers wrote: > > > On Sep 5, 2017, at 9:19 AM, Romain Manni-Bucau > wrote: > > > > Le 5 sept. 2017 17:35, "Ralph Goers" > a écrit : > > > > > >> On Sep 5, 2017, at 6:45 AM, Romain Manni-Bucau > > wrote: > >> > >>> > >> >

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Ralph Goers
> On Sep 5, 2017, at 9:19 AM, Romain Manni-Bucau wrote: > > Le 5 sept. 2017 17:35, "Ralph Goers" > a écrit : > > >> On Sep 5, 2017, at 6:45 AM, Romain Manni-Bucau > wrote: >> >>> >> >> I think it must go the other way: log4j2 must push projects to move >

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Romain Manni-Bucau
Le 5 sept. 2017 17:35, "Ralph Goers" a écrit : > On Sep 5, 2017, at 6:45 AM, Romain Manni-Bucau wrote: > > 2017-09-05 15:33 GMT+02:00 Ralph Goers : >> >> I see your point. I guess we never built a bridge from the Log4j 2 API to >> JUL simply because we couldn’t imagine anyone would want to use

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Ralph Goers
> On Sep 5, 2017, at 6:45 AM, Romain Manni-Bucau wrote: > > 2017-09-05 15:33 GMT+02:00 Ralph Goers : >> >> I see your point. I guess we never built a bridge from the Log4j 2 API to >> JUL simply because we couldn’t imagine anyone would want to use it :-) As I >> said, by choosing jul you have g

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Matt Sicker
The log4j-api to JUL bridge would be for users who have a JUL logging config already that don't want to change, but do want all code to log to the same location. On 5 September 2017 at 08:45, Romain Manni-Bucau wrote: > 2017-09-05 15:33 GMT+02:00 Ralph Goers : > > > > > > On Sep 5, 2017, at 12:1

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Romain Manni-Bucau
2017-09-05 15:33 GMT+02:00 Ralph Goers : > > > On Sep 5, 2017, at 12:11 AM, Romain Manni-Bucau > wrote: > > > > 2017-09-05 9:01 GMT+02:00 Apache ralph.go...@dslextreme.com>>: > > > >> > >> > >> > >> Sent from my iPad > >>> On Sep 4, 2017, at 10:03 PM, Romain Manni-Bucau > > >> wrote: > >>> > >>

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Ralph Goers
> On Sep 5, 2017, at 12:11 AM, Romain Manni-Bucau wrote: > > 2017-09-05 9:01 GMT+02:00 Apache >: > >> >> >> >> Sent from my iPad >>> On Sep 4, 2017, at 10:03 PM, Romain Manni-Bucau >> wrote: >>> >>> Le 5 sept. 2017 05:40, "Ralph Goers" a >> écrit : >>>

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Romain Manni-Bucau
2017-09-05 9:01 GMT+02:00 Apache : > > > > Sent from my iPad > > On Sep 4, 2017, at 10:03 PM, Romain Manni-Bucau > wrote: > > > > Le 5 sept. 2017 05:40, "Ralph Goers" a > écrit : > > > > > >> On Sep 4, 2017, at 2:24 PM, Romain Manni-Bucau > > wrote: > >> > >> Le 4 sept. 2017 20:44, "Matt Sicker

Re: [JCS] update to Log4j 2 facade API

2017-09-05 Thread Apache
Sent from my iPad > On Sep 4, 2017, at 10:03 PM, Romain Manni-Bucau wrote: > > Le 5 sept. 2017 05:40, "Ralph Goers" a écrit : > > >> On Sep 4, 2017, at 2:24 PM, Romain Manni-Bucau > wrote: >> >> Le 4 sept. 2017 20:44, "Matt Sicker" a écrit : >> >> You don't duplicate any logging config.

Re: [JCS] update to Log4j 2 facade API

2017-09-04 Thread Romain Manni-Bucau
Le 5 sept. 2017 05:40, "Ralph Goers" a écrit : > On Sep 4, 2017, at 2:24 PM, Romain Manni-Bucau wrote: > > Le 4 sept. 2017 20:44, "Matt Sicker" a écrit : > > You don't duplicate any logging config. You can use both slf4j-api and > log4j-api with either logback or log4j2. > > > Except you dont

Re: [JCS] update to Log4j 2 facade API

2017-09-04 Thread Ralph Goers
> On Sep 4, 2017, at 2:24 PM, Romain Manni-Bucau wrote: > > Le 4 sept. 2017 20:44, "Matt Sicker" a écrit : > > You don't duplicate any logging config. You can use both slf4j-api and > log4j-api with either logback or log4j2. > > > Except you dont always have the choice with 2 apis. It also m

Re: [JCS] update to Log4j 2 facade API

2017-09-04 Thread Romain Manni-Bucau
Le 4 sept. 2017 20:44, "Matt Sicker" a écrit : You don't duplicate any logging config. You can use both slf4j-api and log4j-api with either logback or log4j2. Except you dont always have the choice with 2 apis. It also messes up logging lifecycle and setup which needs 2 integrations in the envi

Re: [JCS] update to Log4j 2 facade API

2017-09-04 Thread Matt Sicker
You don't duplicate any logging config. You can use both slf4j-api and log4j-api with either logback or log4j2. On 4 September 2017 at 00:08, Romain Manni-Bucau wrote: > If you ignore the container point - which for me is already blocking - you > have 2 issues with migratong to log4j2: > > 1. it

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Romain Manni-Bucau
If you ignore the container point - which for me is already blocking - you have 2 issues with migratong to log4j2: 1. it is not mainstream compared to slf4j for instance so means once again duplicating logging configs in user apps 2. what would give stability to jcs users? Commons logging was targ

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Ralph Goers
Although I am a big fan of Log4j 2, there are use cases where more thought needs to be given then just adopting it, SLF4J, JUL, etc. The problem comes into play in in frameworks like Tomcat, TomEE or JBoss AS. These frameworks need to perform logging but whatever they use has to be able to meet

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Matt Sicker
As an end user of libraries, I much prefer when they stick to using log4j-api or slf4j-api instead of some annoying library-specific facade which requires even more configuration to set up in the end. As long as I can pull in log4j-api, log4j-core, and log4j-slf4j-impl, everything "just works" esse

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Romain Manni-Bucau
Had a test using cdi integration but moving the level test reduced execution time from ~1.4 to 1.25 (normalized numbers). It was ror millions of calls but still worth it IMO. Log impl was indeed jul ;). Le 3 sept. 2017 20:16, "Thomas Vandahl" a écrit : On 03.09.17 20:11, Romain Manni-Bucau wro

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Gary Gregory
On Sun, Sep 3, 2017 at 12:12 PM, Thomas Vandahl wrote: > On 03.09.17 20:05, Gary Gregory wrote: > > Would that not duplicate what logging facades (like log4j-api) already > > provide? > > You mean like commons-logging? Yeah, I understand that's not what is > required here. Otherwise it could stay

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Thomas Vandahl
On 03.09.17 20:11, Romain Manni-Bucau wrote: > On the perf thing: isXXXEnabled can be costly by itself - see my last > commit. Could you please provide some numbers to this claim? Bye, Thomas. - To unsubscribe, e-mail: dev-uns

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Thomas Vandahl
On 03.09.17 20:05, Gary Gregory wrote: > Would that not duplicate what logging facades (like log4j-api) already > provide? You mean like commons-logging? Yeah, I understand that's not what is required here. Otherwise it could stay as it is. I believe that especially a caching layer should be as li

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Romain Manni-Bucau
On the perf thing: isXXXEnabled can be costly by itself - see my last commit. On the light jcs facade: this is what most projects do so +1. This doesnt duplicate log4j one cause log4j is a user facing one where the lib one is configure and provided at container level when relevant. Le 3 sept. 201

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Matt Sicker
That would definitely duplicate effort. I've seen a few libraries out there that abstract out logging only to make the default implementation slf4j or log4j-api which just makes yet another hop of indirection. On 3 September 2017 at 13:05, Gary Gregory wrote: > On Sep 3, 2017 12:00, "Thomas Vand

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Gary Gregory
On Sep 3, 2017 12:00, "Thomas Vandahl" wrote: On 03.09.17 09:02, Romain Manni-Bucau wrote: > Once again the issue is the risk to break users and to ensure the api is > consistent accross all libs (jcs, openjpa, tomee, cxf, activemq, commons, > ...). It is clearly not "is it good or bad" and tomee

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Thomas Vandahl
On 03.09.17 09:02, Romain Manni-Bucau wrote: > Once again the issue is the risk to break users and to ensure the api is > consistent accross all libs (jcs, openjpa, tomee, cxf, activemq, commons, > ...). It is clearly not "is it good or bad" and tomee switch from log4j1 to > jul reduced the number

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Thomas Vandahl
On 02.09.17 20:04, Romain Manni-Bucau wrote: > However reworking the logging in JCS can be interesting, current log usage > is slow and sometimes in synchronized blocks so I guess we can be better. Could you please mark places where this is the case? I spent quite some effort to extract logging fr

Re: [JCS] update to Log4j 2 facade API

2017-09-03 Thread Romain Manni-Bucau
Le 2 sept. 2017 22:34, "Matt Sicker" a écrit : Using JUL for any library, while dependency-free, is the worst of all worlds as it creates a huge overhead in logging. The only workaround in production applications is to disable logging to any logger tied to JUL, and then you have the fun of debugg

Re: [JCS] update to Log4j 2 facade API

2017-09-02 Thread Matt Sicker
Using JUL for any library, while dependency-free, is the worst of all worlds as it creates a huge overhead in logging. The only workaround in production applications is to disable logging to any logger tied to JUL, and then you have the fun of debugging production issues without logs. On 2 Septemb

Re: [JCS] update to Log4j 2 facade API

2017-09-02 Thread Romain Manni-Bucau
Hi Gary, Can only be done in 3.x since we can't break it in a minor. Now more on the ecosystem it would also mean dropping or forking JCS from TomEE since TomEE will stay JUL first for its stack and provides a light facade to switch to log4j2 (long story short: it is to avoid to enforce a lib use

[JCS] update to Log4j 2 facade API

2017-09-02 Thread Gary Gregory
Hi All, How about updating JCS from Commons Logging to Log4j 2? Gary