maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Williams (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MNG-2351) mvn -X doesn't enable debugging
Date Sun, 15 Oct 2006 17:24:54 GMT
    [ http://jira.codehaus.org/browse/MNG-2351?page=comments#action_77689 ] 
            
Andrew Williams commented on MNG-2351:
--------------------------------------

as of today there is a setThresholds( int ) method on LoggerManager which can be used to fix
this issue.

Also the Logger has a setThreshold( int ), so you could loggerManager.getLoggerForComponent(
"blah" ).setThreshold( Logger.LEVEL_DEBUG )

> mvn -X doesn't enable debugging
> -------------------------------
>
>                 Key: MNG-2351
>                 URL: http://jira.codehaus.org/browse/MNG-2351
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 2.1
>            Reporter: Jerome Lacoste
>             Fix For: 2.0.5
>
>
> mvn -X doesn't enable debugging
> If I add the following code to DefaultMaven.execute(...)
>     public void execute( MavenExecutionRequest request )
>         throws MavenExecutionException
>         [...]
>         
>         loggerManager.setThreshold( request.getLoggingLevel() );
>         // ADDED
>         loggerManager.getLoggerForComponent( Maven.ROLE ).info( "XXX logging level "
+ request.getLoggingLevel());
>         loggerManager.getLoggerForComponent( Maven.ROLE ).debug( "XXX logging level "
+ request.getLoggingLevel());
>         System.err.println("XXX logging level " + request.getLoggingLevel());
>         System.err.println("XXX show errors " + request.isShowErrors());
>         System.err.println("XXX logger threshold " + loggerManager.getLoggerForComponent(
Maven.ROLE ).getThreshold());
>         // end of ADDED
> I get:
> [INFO] XXX logging level 0
> XXX logging level 0
> XXX show errors true
> XXX logger threshold 1
> Looks like something is wrong with regard to thresholds in the Maven.ROLE component.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message