On 25 Aug 06, at 10:59 AM 25 Aug 06, Jochen Kuhnle wrote:

Hi,

there is a problem with -X and logging, since loggers created early in the startup phase will not be switched to debug mode. In [1], there is a hack for the "main" logger, but this still leaves all the Plexus components' loggers untouched.

I would like to propose (and create) a patch that introduces a new command line parameter (say -ll or --loglevel) that sets the log level for all logs created by MavenEmbedder's LoggerManager through a ContainerCustomizer in MavenCli.


I'm fixing the logging now in the Maven trunk and Plexus. The new embedder will have sane logging.

The switch could even accept a parameter for detailed log level control (say --loglevel org.apache.maven.artifact.resolver.DefaultArtifactResolver=DEBUG)

This allows setting log levels from the command line without creating any custom component.xml files. Is this acceptable?


This will be there in trunk in a few days so once it's in then if you want to contribute a patch to further customize it that would be fine. I know the logging is crap and I'm fixing it now.

Regards,
Jochen

[1] DefaultMaven.java:

// FIXME: This will not touch the core maven logger, since it's already been initialized for
       // this component.
       loggerManager.setThreshold( request.getLoggingLevel() );

       Logger myLogger = getLogger();

       // TODO: When the above problem is fixed, remove this.
       if ( myLogger instanceof AbstractLogger )
       {
((AbstractLogger) myLogger).setThreshold ( request.getLoggingLevel() );
       }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Jason van Zyl
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to