How do you expect this to work during multithreaded build, when there is
more than one running plugin at any given time?

What you probably want is some sort of thread-local logging level, which
can be scoped to specific plugin and configured from the core.

-- 
Regards,
Igor

On Sat, Apr 4, 2015, at 09:15 AM, Robert Scholte wrote:
> In case of logging frameworks you actually want to know the configuration 
> before starting the application, in this case Maven.
> On my todo list is still a wish to change the logging level once reaching 
> a specific plugin. Concrete: debugging is now way too verbose. In most  
> cases you just want to specify debug-logging for a specific plugin.
> The "simple" solution would be: logging at default level, once reaching  
> the plugin remove *all* Loggers and change the root logging level. Once  
> done: again remove all Loggers and reset the root logging level. Now  
> that's too expensive.
> My idea is to use a different logger (with dynamic root logging level) if 
> and only if someone specifies logging for a certain plugin/goal, e.g  
> -Xcompiler:compile. So far I haven't been able to solve this, since there 
> can be only 1 org.slf4j.impl.StaticLoggerBinder on the classpath.
> 
> So yes, if -B would automatically switch to current slf4j-simple
> otherwise  
> use slf4j-log4j2 with ansi colors, that would be great, but that means  
> that the mvn scripts must construct the correct classpath.
> How about making 2 distributions: a Maven-dist-user and
> Maven-dist-system,  
> each with their predefined logging configuration?
> 
> thanks,
> Robert
> 
> 
> Op Wed, 01 Apr 2015 18:15:45 +0200 schreef Arnaud Héritier  
> <aherit...@gmail.com>:
> 
> > Right.
> > In CI server we may have ansi colors (at least in jenkins) but yes we may
> > consider to deactivate color with batch mode.
> > Or we add a new command line option to turn it off.
> >
> >
> > On Wed, Apr 1, 2015 at 5:48 PM, Manfred Moser <manf...@mosabuam.com>  
> > wrote:
> >
> >> I agree we should activate colors by default, but only if they are
> >> automatically turned OFF in batch mode so that logs in CI server runs  
> >> are
> >> no invalidated in terms of readability.
> >>
> >> manfred
> >>
> >> Arnaud Héritier wrote on 01.04.2015 02:33:
> >>
> >> > Hi,
> >> >
> >> >  Yesterday I rebased, cleaned and updated the slf4j-log4j2 branch
> >> >  It is only one useful commit now :
> >> >
> >> >
> >> https://github.com/apache/maven/commit/dbad2e536a7024a277eef1c56eaa2286f9f2a7f9
> >> >
> >> >  We should consider to integrate it in the next minor release I think
> >> >  The fact that log4j2 is Java6+ is not anymore a problem and it is now
> >> > stable (2.2 nowadays).
> >> >  We should also from my point of view activate colors by default.
> >> >
> >> >  I hope it will be considered for a future 3.4
> >> >
> >> > Cheers,
> >> >
> >> > -----
> >> > Arnaud Héritier
> >> > http://aheritier.net
> >> > Mail/GTalk: aheritier AT gmail DOT com
> >> > Twitter/Skype : aheritier
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: dev-h...@maven.apache.org
> >>
> >>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to