axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils Options.java
Date Thu, 06 Sep 2001 17:43:40 GMT
rubys       01/09/06 10:43:40

  Modified:    java/src/org/apache/axis/utils Options.java
  Log:
  Increase log4j verbosity based on number of "-d" options specified.
  
  Note: previously this was done in every main.  Now it is done once in
  Options.  If we want to make it selectable by program, this code should
  go into a method which is callable by each main.
  
  Revision  Changes    Path
  1.15      +15 -0     xml-axis/java/src/org/apache/axis/utils/Options.java
  
  Index: Options.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Options.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Options.java	2001/09/05 17:23:01	1.14
  +++ Options.java	2001/09/06 17:43:40	1.15
  @@ -115,6 +115,21 @@
           getUser();
           getPassword();
   
  +        // Increase log4j verbosity based on number of "-d" options specified.
  +        int debug = isFlagSet('d');
  +        if (debug>0) {
  +            Priority[] allPriorities = Priority.getAllPossiblePriorities(); 
  +            Priority currentPriority = Category.getRoot().getPriority();
  +            for (int i=0; i<allPriorities.length; i++) {
  +                if (currentPriority == allPriorities[i]) {
  +                    i += debug;
  +                    if (i>=allPriorities.length) i=allPriorities.length-1;
  +                    Category.getRoot().setPriority(allPriorities[i]);
  +                    break;
  +                }
  +            }
  +        }
  +
           // EOASS
           ///////////////////////////////////////////////////////////////////////
       }
  
  
  

Mime
View raw message