ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends CLIMain.java Resources.properties
Date Tue, 26 Mar 2002 02:14:02 GMT
adammurdoch    02/03/25 18:14:02

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/frontends
                        CLIMain.java Resources.properties
  Log:
  * Added --debug command-line option.
  * Changed --log-level to map logging levels so that they match the TaskContext
    log methods.
  
  Revision  Changes    Path
  1.34      +18 -5     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
  
  Index: CLIMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- CLIMain.java	23 Mar 2002 23:41:27 -0000	1.33
  +++ CLIMain.java	26 Mar 2002 02:14:02 -0000	1.34
  @@ -32,7 +32,7 @@
    * to run project.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.33 $ $Date: 2002/03/23 23:41:27 $
  + * @version $Revision: 1.34 $ $Date: 2002/03/26 02:14:02 $
    */
   public class CLIMain
   {
  @@ -54,6 +54,7 @@
       private final static int INCREMENTAL_OPT = 6;
       private final static int HOME_DIR_OPT = 7;
       private final static int DRY_RUN_OPT = 8;
  +    private final static int DEBUG_OPT = 9;
   
       //incompatable options for info options
       private final static int[] INFO_OPT_INCOMPAT = new int[]
  @@ -67,7 +68,7 @@
       //incompatable options for other logging options
       private final static int[] LOG_OPT_INCOMPAT = new int[]
       {
  -        QUIET_OPT, VERBOSE_OPT, LOG_LEVEL_OPT
  +        QUIET_OPT, VERBOSE_OPT, LOG_LEVEL_OPT, DEBUG_OPT
       };
   
       //incompatible options for listener options
  @@ -169,6 +170,11 @@
                                       VERBOSE_OPT,
                                       REZ.getString( "verbose.opt" ),
                                       LOG_OPT_INCOMPAT ),
  +            new CLOptionDescriptor( "debug",
  +                                    CLOptionDescriptor.ARGUMENT_DISALLOWED,
  +                                    DEBUG_OPT,
  +                                    REZ.getString( "debug.opt" ),
  +                                    LOG_OPT_INCOMPAT ),
               new CLOptionDescriptor( "listener",
                                       CLOptionDescriptor.ARGUMENT_REQUIRED,
                                       LISTENER_OPT,
  @@ -255,6 +261,9 @@
                   case VERBOSE_OPT:
                       m_priority = BasicLogger.LEVEL_INFO;
                       break;
  +                case DEBUG_OPT:
  +                    m_priority = BasicLogger.LEVEL_DEBUG;
  +                    break;
                   case QUIET_OPT:
                       m_priority = BasicLogger.LEVEL_ERROR;
                       break;
  @@ -426,17 +435,21 @@
           {
               return BasicLogger.LEVEL_DEBUG;
           }
  -        else if( "INFO".equals( logLevelCapitalized ) )
  +        else if( "VERBOSE".equals( logLevelCapitalized ) )
           {
               return BasicLogger.LEVEL_INFO;
           }
  -        else if( "WARN".equals( logLevelCapitalized ) )
  +        else if( "INFO".equals( logLevelCapitalized ) )
           {
               return BasicLogger.LEVEL_WARN;
           }
  -        else if( "ERROR".equals( logLevelCapitalized ) )
  +        else if( "WARN".equals( logLevelCapitalized ) )
           {
               return BasicLogger.LEVEL_ERROR;
  +        }
  +        else if( "ERROR".equals( logLevelCapitalized ) )
  +        {
  +            return BasicLogger.LEVEL_FATAL;
           }
           else
           {
  
  
  
  1.7       +4 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/Resources.properties,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Resources.properties	9 Mar 2002 10:13:03 -0000	1.6
  +++ Resources.properties	26 Mar 2002 02:14:02 -0000	1.7
  @@ -2,9 +2,10 @@
   
   help.opt=Display this help message.
   file.opt=Specify the build file.
  -log-level.opt=Specify the verbosity level at which to log messages. (DEBUG|INFO|WARN|ERROR|FATAL_ERROR).
  -quiet.opt=Equivalent to --log-level=FATAL_ERROR.
  -verbose.opt=Equivalent to --log-level=INFO.
  +log-level.opt=Specify the verbosity level at which to log messages. (DEBUG|VERBOSE|INFO|WARN|ERROR).
  +quiet.opt=Equivalent to --log-level=ERROR.
  +verbose.opt=Equivalent to --log-level=VERBOSE.
  +debug.opt=Equivalent to --log-level=DEBUG.
   listener.opt=Specify the listener for log events.
   noprefix.opt=Do not prefix output with the task name.  Equivalent to --listener noprefix.
   version.opt=Display version.
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message