fix the logging issues - bad merge

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@429932 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2006-08-09 02:51:09 +00:00
parent 52f6e19961
commit 87e9191936
1 changed files with 9 additions and 8 deletions

View File

@ -77,6 +77,7 @@ public class MavenCli
}
boolean debug = commandLine.hasOption( CLIManager.DEBUG );
boolean quiet = !debug && commandLine.hasOption( CLIManager.QUIET );
boolean showErrors = debug || commandLine.hasOption( CLIManager.ERRORS );
@ -170,13 +171,6 @@ public class MavenCli
{
recursive = false;
}
else if ( commandLine.hasOption( CLIManager.QUIET ) )
{
// TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
// Ideally, we could use Warn across the board
loggerManager.setThreshold( Logger.LEVEL_ERROR );
// TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
}
if ( commandLine.hasOption( CLIManager.FAIL_FAST ) )
{
@ -330,9 +324,16 @@ public class MavenCli
{
loggingLevel = MavenExecutionRequest.LOGGING_LEVEL_DEBUG;
}
else if ( quiet )
{
// TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
// Ideally, we could use Warn across the board
loggingLevel = MavenExecutionRequest.LOGGING_LEVEL_ERROR;
// TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
}
else
{
loggingLevel = MavenExecutionRequest.LOGGING_LEVEL_WARN;
loggingLevel = MavenExecutionRequest.LOGGING_LEVEL_INFO;
}
Properties executionProperties = getExecutionProperties( commandLine );