Re: Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Jason van Zyl
Since Maven 3.1.0 SLF4J is included with the distribution. The Mojo logger is baked in but you can use SLF4J is you prefer. On Feb 2, 2015, at 6:58 PM, Lennart Jörelid wrote: > From which version of the Maven-Plugin-API are we using SLF4J Loggers, > Jason? > In the 2.2.1 plugin API, the Abstrac

Re: Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Lennart Jörelid
>From which version of the Maven-Plugin-API are we using SLF4J Loggers, Jason? In the 2.2.1 plugin API, the AbstractMojo contains an org.apache.maven.plugin.logging.Log. I presume that this is changed in a later version of the plugin API, right? public abstract class AbstractMojo implements M

Re: Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Jason van Zyl
On Feb 2, 2015, at 6:44 PM, Lennart Jörelid wrote: > Implying that Maven should simply use SJF4J instead of the Maven logging, I > take it? Maven does use SLF4J now. We use the slf4j-simple implementation by default. If there are many libraries that use JUL then SLF4J provides a standard funne

Re: Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Lennart Jörelid
Implying that Maven should simply use SJF4J instead of the Maven logging, I take it? And - yes - that would be a simpler approach. (Or at least an approach where one would not need to wrap/convert loggers to loggers in a custom manner over and over ... ). 2015-02-02 17:02 GMT+01:00 Jason van Zyl

Re: [mojo-dev] Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Stephen Connolly
Should you really be using the JVM of maven to run these tools? I would argue no. You should be forking the toolchains specified JVM and using that forked JVM to do the work. If you do it that way you can completely control what logging those forked JVMs uses and route it to the Maven logger of ch

Re: Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Jason van Zyl
Would it be easier if we just packaged jul-over-slf4j in the distribution to cover these cases? On Feb 2, 2015, at 10:07 AM, Lennart Jörelid wrote: > Hello all, > > I'm in the final phase of revamping the Jaxb2-Maven-Plugin, and have > encountered a (presumably) common problem. The plugin dele

Best practises for manipulating the JUL Logger in a Plugin

2015-02-02 Thread Lennart Jörelid
Hello all, I'm in the final phase of revamping the Jaxb2-Maven-Plugin, and have encountered a (presumably) common problem. The plugin delegates most of its work to the JDK-distributed tools XJC and SchemaGen. These two tools use JUL for logging; and their respective outputs should be emitted onto