Le jeudi 15 novembre 2012 08:30:11 Jason van Zyl a écrit :
> On Nov 15, 2012, at 8:18 AM, Olivier Lamy <[email protected]> wrote:
> > Hi,
> > Currently logger for all mojos is the DefaultPluginManager logger.
> > So it's a bit hard to have filtering per plugin (i.e. only compiler in
> > debug etc..)
> > 
> > So I'd like to change that to be able to customize mojo logging.
> > My first is idea is mojo with logger name ${groupId}:${artifactId} (ie
> > org.apache.maven.plugins:maven-clean-plugin) so if you only want debug
> > for compiler put logger org.apache.maven.plugins:maven-compiler-plugin
> > to debug.
> > 
> > Makes sense ?
> 
> Why not use the standard way of using the class name of the plugin and using
> standard techniques for filtering?
some thoughts (to be added to other valid thgoughts in this thread):
- "the class name of the plugin": a plugin doesn't have class a name, only 
*mojos* have a class name (a plugin is a collection of mojos that are the real 
parts executed)
- "the standard way of using the class name": yes, this is the standard I 
know, but in Maven, actually, the logger is shared between the mojo and every 
other classes the mojo executes, then we're out of the standard "the logger is 
the class name causing the log"

then IMHO, Maven in its code has a structure that cannot map to the standard 
"logger by classname" pattern, or we need some refactoring


> > The code to change is here:
> > https://github.com/olamy/maven-3/blob/log4j2/maven-core/src/main/java/org/
> > apache/maven/plugin/internal/DefaultMavenPluginManager.java#L445
> > 
> > WDYT ?
> > 
> > Thanks
> > --
> > Olivier Lamy
> > Talend: http://coders.talend.com
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> 
> Thanks,
> 
> Jason
> 
> ----------------------------------------------------------
> Jason van Zyl
> Founder & CTO, Sonatype
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> ---------------------------------------------------------
> 
> I never make the mistake of arguing with people for whose opinions I have no
> respect.
> 
> -- Edward Gibbon

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to