On Nov 15, 2012, at 8:33 AM, Benson Margulies <[email protected]> wrote:

> On Thu, Nov 15, 2012 at 8:30 AM, Jason van Zyl <[email protected]> wrote:
>> 
>> 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?
> 
> Because Maven Users know the GAV of plugins, and don't know, and
> shouldn't need to know, the class names.
> 

Yes, but we do. If we wanted to provide domain specific logging it would be our 
job to do the mapping between class names and filters. It's just very 
non-standard to create logger names based on something other than class names.

> This change addresses a real problem: when something doesn't work, we
> tell users to use -X, and they get immediately drowned in irrelevance.
> If we could tell them to log 'just one plugin' in some sensible,
> logical, way, they would be less frustrated. Using this scheme of
> olamy's has that effect.
> 

I agree, but to achieve that does not require doing something non-standard. For 
us a simple filter of any number of class names is easy, integration into 
larger systems that use the common pattern of class name also do not become 
problematic.

I agree that filtering is a nice feature, it can be done using the standard 
practice of using the class name.

> 
> 
>> 
>>> 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]
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder & CTO, Sonatype
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------






Reply via email to