And let's not forget that Log4j also is a facade API:
https://logging.apache.org/log4j/2.x/manual/api-separation.html

Gary


On Fri, Nov 4, 2022, 06:56 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
>

Reply via email to