ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Replace.java
Date Sun, 12 Dec 2004 21:22:20 GMT
jkf         2004/12/12 13:22:20

  Modified:    src/main/org/apache/tools/ant/taskdefs Replace.java
  Log:
  Last patch removed some significant logging in verbose mode.
  re-added.
  
  Revision  Changes    Path
  1.57      +13 -0     ant/src/main/org/apache/tools/ant/taskdefs/Replace.java
  
  Index: Replace.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Replace.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- Replace.java	12 Dec 2004 21:08:12 -0000	1.56
  +++ Replace.java	12 Dec 2004 21:22:19 -0000	1.57
  @@ -594,6 +594,8 @@
   
               int repCountStart = replaceCount;
   
  +            logFilterChain(src.getPath());
  +
               out.setInputBuffer(buildFilterChain(in.getOutputBuffer()));
   
               while (in.readChunck()) {
  @@ -681,6 +683,17 @@
           return buf;
       }
   
  +    /**
  +     * Logs the chain of filters to operate on the file.
  +     * @param filename
  +     */
  +    private void logFilterChain(String filename) {
  +        for (int i = 0; i < replacefilters.size(); i++) {
  +            Replacefilter filter = (Replacefilter) replacefilters.elementAt(i);
  +            log("Replacing in " + filename + ": " + filter.getToken()
  +                    + " --> " + filter.getReplaceValue(), Project.MSG_VERBOSE);
  +        }
  +    }
       /**
        * Set the source file; required unless <code>dir</code> is set.
        * @param file source file
  
  
  

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


Mime
View raw message