views:

102

answers:

1

Hi there.

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!

+1  A: 

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.

khmarbaise
That's too bad but I already thought so.Thanks for clearing that up! I gave further details about how I use the SCM plugin beneath your comment to the initial question.
Patrick Bergner