Howdy, Will we keep asking the same questions over and over again? Until we get the "wanted" answer?
Maven core and ecosystem uses SLF4J API. Full stop. Just use SLF4J API, and you will get a pre-configured back-end as well. Done. Now,. this story keeps popping up: "plugin developers using framework...." begs the question: what framework are we talking about? And how common is this story? What percentage of Maven plugins USE a "framework"? my 5 cents. T On Fri, Nov 4, 2022 at 11:56 AM Slawomir Jaranowski <s.jaranow...@gmail.com> wrote: > Hi, > > I want to start ( again :-) ) a discussion about logging in Maven plugins. > > First I agree that plugin developers should use logging methods provided by > Plugin api. > > But we can not expect plugin developers to write everything from scratch. > In many cases they may want to use an external library to do tasks needed > by the plugin. > > We don't have any control over what logging framework is used in the > external library used by plugin developers. > > We also maintain some libraries which can be used by plugin and also as > standalone in another project. > In such a case the question is - what logging we should use [1]? > > Last time I did a test, I use Java util logging from JDK in the Maven > plugin. > I see that Java util logging use default configuration, eg. we will have > two lines for one log event. > Even more options -q and -X have no effect for such a logger. > > One of the solution for such problem is using "Bridging" methods supported > by slf4j [2] > Probably all of existing and future logging frameworks can not be covered - > but most of common using will be. > > I hope that, even if we will want to change the logging framework used > internally in Maven, we can also use the same method. > > [1] https://github.com/apache/maven-dependency-analyzer/pull/71 > [2] https://www.slf4j.org/legacy.html > > > -- > Sławomir Jaranowski >