Question

I don't know if this is actually possible, but can I take complete control over logging from inside a Maven Mojo? With complete control I mean that only messages from my Mojo are logged or that I can decide wether a given message shall be logged.

The context is that I'm using the maven-scm-plugin in my plugin to do some SCM action and it floods the log with

[INFO] Executing: cmd.exe /X /C "svn --non-interactive update D:\..."
[INFO] Working directory: D:\...

while my own messages get lost and are hard to notice.

After my Mojo finishes, logging can, and should, return to normal.

I tried to use setLog( Log ) to inject an own logger but that way I only get hold of my own messages. The instance of ScmManager I use to access maven-scm-plugin doesn't seem to have an appropiate method as well.

Thanks for your help!

Was it helpful?

Solution

You can't really control the level of log output of an other plugin than your own (only via -X). Only if you change the code of the other plugins.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top