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