Hello Matt, I'd say it is desirable to make Cobertura log with a single logging system, and - if the Cobertura community choose the JUL system - use something like Mark's approach within the cobertura-maven-plugin. The C-M-P implementation will need to redirect all Cobertura's logging output into the normal Maven's plugin log.
2014-11-11 18:29 GMT+01:00 Matt Benson <gudnabr...@gmail.com>: > Dennis: > Would(n't) the work Mark Struberg did at [1] be of use here? > > HTH, > Matt > > [1] > > http://svn.apache.org/viewvc/commons/proper/weaver/trunk/maven-plugin/src/main/java/org/apache/commons/weaver/maven/JavaLoggingToMojoLoggingRedirector.java?revision=HEAD&view=markup > On Nov 11, 2014 1:50 AM, "Dennis Lundberg" <denn...@apache.org> wrote: > > > Hi, > > > > I'm working on the Cobertura Maven Plugin over at Mojo, and have run > > into a problem that I cannot solve. > > > > This plugin wraps an external tool, Cobertura, which logs stuff either > > by System.out.println() or by using Java Util Logging (JUL). The > > printing to standard out/err is not a problem and the output ends up > > where expected. The problem is with JUL. Here's an output example when > > using Cobertura's own command line inteface: > > > > Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file > > 2014-nov-11 08:18:03 > > net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler > > loadCoverageData > > INFO: Cobertura: Loaded information on 5 classes. > > Report time: 231ms > > > > The first line is using stdout and the last 2 lines are a log message > > using JUL. > > > > Now here's what the output form the plugin looks like, after being > > handled by CommandLineUtils.executeCommanLine() from plexus-utils: > > > > [INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT > file > > [ERROR] 2014-nov-11 08:24:29 > > net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler > > loadCoverageData > > INFO: Cobertura: Loaded information on 5 classes. > > > > As you can see the first line is OK, but the second line is not. > > Somewhere the logging output from JUL is interpreted as being an error > > on the Maven side of things. > > > > Is there any way to tell plexus-utils to treat JUL as being on INFO > > level, or better yet to wrap JUL inside a Mojo logger? > > > > > > -- > > Dennis Lundberg > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > > -- -- +==============================+ | Bästa hälsningar, | [sw. "Best regards"] | | Lennart Jörelid | EAI Architect & Integrator | | jGuru Europe AB | Mölnlycke - Kista | | Email: l...@jguru.se | URL: www.jguru.se | Phone | (skype): jgurueurope | (intl): +46 708 507 603 | (domestic): 0708 - 507 603 +==============================+