[ http://jira.codehaus.org/browse/MNG-2351?page=comments#action_66849 ]
Jerome Lacoste commented on MNG-2351:
-------------------------------------
Given that LoggerManager API says that
/**
* Sets the threshold for all new loggers. It will NOT affect the existing
loggers.
* This is usually only set once while the logger manager is configured.
* @param threshold The new threshold.
*/
void setThreshold( int threshold );
I thought that the Maven.ROLE logger must have already existed. I tried to
force its theshold to DEBUG using LoggerManager.setThreshold(Maven.ROLE, 0) but
that didn't work.
> mvn -X doesn't enable debugging
> -------------------------------
>
> Key: MNG-2351
> URL: http://jira.codehaus.org/browse/MNG-2351
> Project: Maven 2
> Type: Bug
> Components: Embedding
> Versions: 2.1
> Reporter: Jerome Lacoste
>
>
> 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