commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester Digester.java
Date Sat, 05 Jan 2002 00:48:55 GMT
craigmcc    02/01/04 16:48:55

  Modified:    digester/src/java/org/apache/commons/digester Digester.java
  Log:
  Re-added getDebug() and setDebug() methods, because *lots* of external code
  depends on them.
  
  (Naughty naughty Scott, removing public APIs without deprecating them :-)
  
  Revision  Changes    Path
  1.32      +38 -4     jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java
  
  Index: Digester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Digester.java	4 Jan 2002 05:32:11 -0000	1.31
  +++ Digester.java	5 Jan 2002 00:48:55 -0000	1.32
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
1.31 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.31 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
1.32 2002/01/05 00:48:55 craigmcc Exp $
  + * $Revision: 1.32 $
  + * $Date: 2002/01/05 00:48:55 $
    *
    * ====================================================================
    *
  @@ -112,7 +112,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.31 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.32 $ $Date: 2002/01/05 00:48:55 $
    */
   
   public class Digester extends DefaultHandler {
  @@ -392,6 +392,40 @@
           if (lastSlash >= 0)
               elementName = elementName.substring(lastSlash + 1);
           return (elementName);
  +
  +    }
  +
  +
  +    /**
  +     * Return the debugging detail level of our currently enabled logger.
  +     *
  +     * @deprecated Call getLogger() and use it's getLevel() method
  +     */
  +    public int getDebug() {
  +
  +        return (log.getLevel());
  +
  +    }
  +
  +
  +    /**
  +     * Set the debugging detail level of our currently enabled logger.
  +     *
  +     * @param debug New debugging detail level (0=off, increasing integers
  +     *  for more detail)
  +     *
  +     * @deprecated Call getLogger() and use its setLevel() method
  +     */
  +    public void setDebug(int debug) {
  +
  +        // Compute an appropriate level value
  +        int level = Log.INFO;
  +        if (debug >= 1) {
  +            level = Log.DEBUG;
  +        }
  +
  +        // Tell our Log to use the new level
  +        log.setLevel(level);
   
       }
   
  
  
  

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


Mime
View raw message