To be honest, I never wanted to promote the idea of people coding to the Log4j 2 API and then using something else. It is supported only because we have to.
As to Gary’s point, I never wanted Logger.setLevel() because it is really requires that a LoggerConfig be created behind the scene, if it doesn’t exist already, in order to change the level. I don’t think simple users should be able to affect the logging configuration. Ralph > On Feb 29, 2016, at 9:54 AM, Mikael Ståldal <[email protected]> wrote: > > Currently it might be necessary to have an abstraction API in some cases, but > I don't like the idea of promoting Log4J 2 as the best logging abstraction > API. We should promote Log4J 2 as the best complete logging solution for the > JVM. > > I see the possibility to plug in a different impl into log4j-api as a curious > side effect, not a main feature. > > On Mon, Feb 29, 2016 at 5:42 PM, Gary Gregory <[email protected] > <mailto:[email protected]>> wrote: > But we do provide an abstraction API, and in fact some of the design in has a > bit of a LCD feel to it. For example, we do not have a Logger.setLevel() API. > > For good or bad, some folks DO want an abstracted logging API, and this is > required to get a large stack of 3rd party components working together WRT > logging. > > Gary > > On Mon, Feb 29, 2016 at 8:36 AM, Mikael Ståldal <[email protected] > <mailto:[email protected]>> wrote: > I think the idea of having an abstraction API for different logging > implementation is inherently bad. Both commons-logging and SLF4J have > probably created more problems than they have solved. > > One reason I like Log4J 2 is that it doesn't claim to be an abstraction API, > and I see it as a way to eventually get out of this mess. It have plugins > (appenders, layouts, etc.) though, and that is good, that's where the > abstraction layer should be. I hope that one day people will stop using > commons-logging / SLF4J and use Log4J 2 directly instead. > > So I am one of the people who "think that log4j-api isn't analogous to > slf4j-api where log4j-core is like logback", and I like it that way. > > On Mon, Feb 29, 2016 at 4:41 PM, Ralph Goers <[email protected] > <mailto:[email protected]>> wrote: > However, it is important to remember that SLF4J was created before Logback > and was meant to be a new abstraction API. You can see that right here in the > archives for this mailing list. > > OTOH, Log4j 2’s API was created so that “normal” users would be able to know > what was safe to code against and what wasn’t. Log4j 1 had lots of problems > because users were coding against pretty much all the components and > expecting them to remain compatible. > > In the end, the result is similar. You can use either API and bind with > another implementation, however binding with the “targeted” backend is still > more efficient. > > Ralph > >> On Feb 29, 2016, at 8:27 AM, Matt Sicker <[email protected] >> <mailto:[email protected]>> wrote: >> >> Because some people think that log4j-api isn't analogous to slf4j-api where >> log4j-core is like logback. It's a naming confusion I'd guess. >> >> On 29 February 2016 at 03:38, Mikael Ståldal <[email protected] >> <mailto:[email protected]>> wrote: >> Why is it important to point out that Log4j 2 has API / impl separation? >> >> On Fri, Feb 26, 2016 at 10:33 PM, Ralph Goers <[email protected] >> <mailto:[email protected]>> wrote: >> Not on that site. The issue he is bringing up was discusses a few years ago >> either on one of our lists. >> >> Ralph >> >>> On Feb 26, 2016, at 2:24 PM, Gary Gregory <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> Is that worth pointing out? >>> >>> Gary >>> >>> On Fri, Feb 26, 2016 at 1:04 PM, Ralph Goers <[email protected] >>> <mailto:[email protected]>> wrote: >>> Well, that is understandable. He has been working on this stuff a long >>> time. And I know he wasn’t happy about the documentation issue, even though >>> all that documentation derived from the log4j 1 manual. >>> >>> Ralph >>> >>>> On Feb 26, 2016, at 2:00 PM, Gary Gregory <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> Yeah, seems a little strong a reply. He sure has a lot of emotion attached >>>> to the issue! >>>> >>>> Gary >>>> >>>> On Fri, Feb 26, 2016 at 12:13 PM, Ralph Goers <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> Wow. Ceki sure took offense to that! >>>> >>>> Ralph >>>> >>>>> On Feb 26, 2016, at 11:18 AM, Gary Gregory <[email protected] >>>>> <mailto:[email protected]>> wrote: >>>>> >>>>> https://github.com/swagger-api/swagger-parser/issues/209#issuecomment-189377712 >>>>> >>>>> <https://github.com/swagger-api/swagger-parser/issues/209#issuecomment-189377712> >>>>> What can we do to educate and publicize the fact that Log4j 2 is an API >>>>> too? >>>>> >>>>> Gary >>>>> >>>> >>>> >>>> >>>> >>>> -- >>>> E-Mail: [email protected] <mailto:[email protected]> | >>>> [email protected] <mailto:[email protected]> >>>> Java Persistence with Hibernate, Second Edition >>>> <http://www.manning.com/bauer3/> >>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >>>> Spring Batch in Action <http://www.manning.com/templier/> >>>> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> >>>> Home: http://garygregory.com/ <http://garygregory.com/> >>>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory> >>> >>> >>> >>> -- >>> E-Mail: [email protected] <mailto:[email protected]> | >>> [email protected] <mailto:[email protected]> >>> Java Persistence with Hibernate, Second Edition >>> <http://www.manning.com/bauer3/> >>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >>> Spring Batch in Action <http://www.manning.com/templier/> >>> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> >>> Home: http://garygregory.com/ <http://garygregory.com/> >>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory> >> >> >> >> -- >> >> >> Mikael Ståldal >> Senior software developer >> >> Magine TV >> [email protected] <mailto:[email protected]> >> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >> <http://www.magine.com/> >> >> Privileged and/or Confidential Information may be contained in this message. >> If you are not the addressee indicated in this message >> (or responsible for delivery of the message to such a person), you may not >> copy or deliver this message to anyone. In such case, >> you should destroy this message and kindly notify the sender by reply email. >> >> >> >> >> -- >> Matt Sicker <[email protected] <mailto:[email protected]>> > > > > > -- > > > Mikael Ståldal > Senior software developer > > Magine TV > [email protected] <mailto:[email protected]> > Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com > <http://www.magine.com/> > > Privileged and/or Confidential Information may be contained in this message. > If you are not the addressee indicated in this message > (or responsible for delivery of the message to such a person), you may not > copy or deliver this message to anyone. In such case, > you should destroy this message and kindly notify the sender by reply email. > > > > > -- > E-Mail: [email protected] <mailto:[email protected]> | > [email protected] <mailto:[email protected]> > Java Persistence with Hibernate, Second Edition > <http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> > Home: http://garygregory.com/ <http://garygregory.com/> > Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory> > > > -- > > > Mikael Ståldal > Senior software developer > > Magine TV > [email protected] <mailto:[email protected]> > Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com > <http://www.magine.com/> > > Privileged and/or Confidential Information may be contained in this message. > If you are not the addressee indicated in this message > (or responsible for delivery of the message to such a person), you may not > copy or deliver this message to anyone. In such case, > you should destroy this message and kindly notify the sender by reply email. >
