donaldp     01/12/23 06:21:51

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        Zip.java War.java UpToDate.java Untar.java
                        Touch.java Tar.java SQLExec.java Sleep.java
                        SendEmail.java Rmic.java Replace.java
                        RecorderEntry.java Property.java PathConvert.java
                        Javac.java Java.java Jar.java Input.java
                        FixCRLF.java Filter.java Expand.java ExecuteOn.java
                        Ear.java DependSet.java Checksum.java
                        Available.java
  Log:
  Start updating logging to myrmidon style logging
  
  Revision  Changes    Path
  1.11      +7 -6      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Zip.java  2001/12/23 06:33:35     1.10
  +++ Zip.java  2001/12/23 14:21:50     1.11
  @@ -23,7 +23,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.FileScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.EnumeratedAttribute;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.ZipFileSet;
  @@ -384,8 +383,9 @@
           {
               if( !renamedFile.delete() )
               {
  -                log( "Warning: unable to delete temporary file " +
  -                     renamedFile.getName(), Project.MSG_WARN );
  +                final String message = "Warning: unable to delete temporary 
file " +
  +                    renamedFile.getName();
  +                getLogger().warn( message );
               }
           }
       }
  @@ -420,8 +420,9 @@
           {
               if( emptyBehavior.equals( "skip" ) )
               {
  -                log( "Warning: skipping " + archiveType + " archive " + 
zipFile +
  -                     " because no files were included.", Project.MSG_WARN );
  +                final String message = "Warning: skipping " + archiveType + 
" archive " + zipFile +
  +                    " because no files were included.";
  +                getLogger().warn( message );
                   return true;
               }
               else if( emptyBehavior.equals( "fail" ) )
  @@ -708,7 +709,7 @@
           // In this case using java.util.zip will not work
           // because it does not permit a zero-entry archive.
           // Must create it manually.
  -        log( "Note: creating empty " + archiveType + " archive " + zipFile, 
Project.MSG_INFO );
  +        getLogger().info( "Note: creating empty " + archiveType + " archive 
" + zipFile );
           try
           {
               OutputStream os = new FileOutputStream( zipFile );
  
  
  
  1.7       +4 -3      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java
  
  Index: War.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- War.java  2001/12/23 06:33:35     1.6
  +++ War.java  2001/12/23 14:21:50     1.7
  @@ -10,7 +10,6 @@
   import java.io.File;
   import java.io.IOException;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.ZipFileSet;
   import org.apache.tools.zip.ZipOutputStream;
   
  @@ -101,8 +100,10 @@
           {
               if( deploymentDescriptor == null || 
!deploymentDescriptor.equals( file ) || descriptorAdded )
               {
  -                log( "Warning: selected " + archiveType + " files include a 
WEB-INF/web.xml which will be ignored " +
  -                     "(please use webxml attribute to " + archiveType + " 
task)", Project.MSG_WARN );
  +                final String message = "Warning: selected " + archiveType +
  +                    " files include a WEB-INF/web.xml which will be ignored 
" +
  +                    "(please use webxml attribute to " + archiveType + " 
task)";
  +                getLogger().warn( message );
               }
               else
               {
  
  
  
  1.11      +2 -5      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UpToDate.java     2001/12/23 06:33:35     1.10
  +++ UpToDate.java     2001/12/23 14:21:50     1.11
  @@ -12,7 +12,6 @@
   import java.util.Iterator;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.condition.Condition;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Mapper;
  @@ -150,13 +149,11 @@
               setProperty( _property, this.getValue() );
               if( mapperElement == null )
               {
  -                log( "File \"" + _targetFile.getAbsolutePath() + "\" is up 
to date.",
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( "File \"" + _targetFile.getAbsolutePath() 
+ "\" is up to date." );
               }
               else
               {
  -                log( "All target files have been up to date.",
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( "All target files have been up to date." 
);
               }
           }
       }
  
  
  
  1.7       +2 -3      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Untar.java
  
  Index: Untar.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Untar.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Untar.java        2001/12/23 06:33:35     1.6
  +++ Untar.java        2001/12/23 14:21:50     1.7
  @@ -11,7 +11,6 @@
   import java.io.FileInputStream;
   import java.io.IOException;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.tar.TarEntry;
   import org.apache.tools.tar.TarInputStream;
   
  @@ -30,7 +29,7 @@
           TarInputStream tis = null;
           try
           {
  -            log( "Expanding: " + srcF + " into " + dir, Project.MSG_INFO );
  +            getLogger().info( "Expanding: " + srcF + " into " + dir );
   
               tis = new TarInputStream( new FileInputStream( srcF ) );
               TarEntry te = null;
  @@ -41,7 +40,7 @@
                                te.getName(),
                                te.getModTime(), te.isDirectory() );
               }
  -            log( "expand complete", Project.MSG_VERBOSE );
  +            getLogger().debug( "expand complete" );
   
           }
           catch( IOException ioe )
  
  
  
  1.10      +2 -3      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Touch.java
  
  Index: Touch.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Touch.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Touch.java        2001/12/23 06:33:35     1.9
  +++ Touch.java        2001/12/23 14:21:50     1.10
  @@ -134,7 +134,7 @@
           {
               if( !file.exists() )
               {
  -                log( "Creating " + file, Project.MSG_INFO );
  +                getLogger().info( "Creating " + file );
                   try
                   {
                       FileOutputStream fos = new FileOutputStream( file );
  @@ -150,8 +150,7 @@
   
           if( millis >= 0 && getProject().getJavaVersion() == Project.JAVA_1_1 
)
           {
  -            log( "modification time of files cannot be set in JDK 1.1",
  -                 Project.MSG_WARN );
  +            getLogger().warn( "modification time of files cannot be set in 
JDK 1.1" );
               return;
           }
   
  
  
  
  1.11      +9 -8      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
  
  Index: Tar.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Tar.java  2001/12/23 06:33:35     1.10
  +++ Tar.java  2001/12/23 14:21:50     1.11
  @@ -163,12 +163,11 @@
   
           if( upToDate )
           {
  -            log( "Nothing to do: " + tarFile.getAbsolutePath() + " is up to 
date.",
  -                 Project.MSG_INFO );
  +            getLogger().info( "Nothing to do: " + tarFile.getAbsolutePath() 
+ " is up to date." );
               return;
           }
   
  -        log( "Building tar: " + tarFile.getAbsolutePath(), Project.MSG_INFO 
);
  +        getLogger().info( "Building tar: " + tarFile.getAbsolutePath() );
   
           TarOutputStream tOut = null;
           try
  @@ -256,17 +255,19 @@
               {
                   if( longFileMode.isOmitMode() )
                   {
  -                    log( "Omitting: " + vPath, Project.MSG_INFO );
  +                    getLogger().info( "Omitting: " + vPath );
                       return;
                   }
                   else if( longFileMode.isWarnMode() )
                   {
  -                    log( "Entry: " + vPath + " longer than " +
  -                         TarConstants.NAMELEN + " characters.", 
Project.MSG_WARN );
  +                    final String message = "Entry: " + vPath + " longer than 
" +
  +                        TarConstants.NAMELEN + " characters.";
  +                    getLogger().warn( message );
                       if( !longWarningGiven )
                       {
  -                        log( "Resulting tar file can only be processed 
successfully"
  -                             + " by GNU compatible tar commands", 
Project.MSG_WARN );
  +                        final String message2 = "Resulting tar file can only 
be processed successfully"
  +                            + " by GNU compatible tar commands";
  +                        getLogger().warn( message2 );
                           longWarningGiven = true;
                       }
                   }
  
  
  
  1.11      +18 -22    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SQLExec.java      2001/12/23 06:33:35     1.10
  +++ SQLExec.java      2001/12/23 14:21:50     1.11
  @@ -33,7 +33,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.EnumeratedAttribute;
   import org.apache.tools.ant.types.FileSet;
  @@ -456,15 +455,14 @@
               Class dc;
               if( classpath != null )
               {
  -                log( "Loading " + driver + " using AntClassLoader with 
classpath " + classpath,
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( "Loading " + driver + " using 
AntClassLoader with classpath " + classpath );
   
                   loader = new AntClassLoader( getProject(), classpath );
                   dc = loader.loadClass( driver );
               }
               else
               {
  -                log( "Loading " + driver + " using system loader.", 
Project.MSG_VERBOSE );
  +                getLogger().debug( "Loading " + driver + " using system 
loader." );
                   dc = Class.forName( driver );
               }
               driverInstance = (Driver)dc.newInstance();
  @@ -484,7 +482,7 @@
   
           try
           {
  -            log( "connecting to " + url, Project.MSG_VERBOSE );
  +            getLogger().debug( "connecting to " + url );
               Properties info = new Properties();
               info.put( "user", userId );
               info.put( "password", password );
  @@ -508,7 +506,7 @@
               {
                   if( output != null )
                   {
  -                    log( "Opening PrintStream to output file " + output, 
Project.MSG_VERBOSE );
  +                    getLogger().debug( "Opening PrintStream to output file " 
+ output );
                       out = new PrintStream( new BufferedOutputStream( new 
FileOutputStream( output ) ) );
                   }
   
  @@ -520,7 +518,7 @@
                       ( (Transaction)e.next() ).runTransaction( out );
                       if( !autocommit )
                       {
  -                        log( "Commiting transaction", Project.MSG_VERBOSE );
  +                        getLogger().debug( "Commiting transaction" );
                           conn.commit();
                       }
                   }
  @@ -602,10 +600,10 @@
               {
                   String theVendor = 
dmd.getDatabaseProductName().toLowerCase();
   
  -                log( "RDBMS = " + theVendor, Project.MSG_VERBOSE );
  +                getLogger().debug( "RDBMS = " + theVendor );
                   if( theVendor == null || theVendor.indexOf( rdbms ) < 0 )
                   {
  -                    log( "Not the required RDBMS: " + rdbms, 
Project.MSG_VERBOSE );
  +                    getLogger().debug( "Not the required RDBMS: " + rdbms );
                       return false;
                   }
               }
  @@ -614,12 +612,12 @@
               {
                   String theVersion = 
dmd.getDatabaseProductVersion().toLowerCase();
   
  -                log( "Version = " + theVersion, Project.MSG_VERBOSE );
  +                getLogger().debug( "Version = " + theVersion );
                   if( theVersion == null ||
                       !( theVersion.startsWith( version ) ||
                       theVersion.indexOf( " " + version ) >= 0 ) )
                   {
  -                    log( "Not the required version: \"" + version + "\"", 
Project.MSG_VERBOSE );
  +                    getLogger().debug( "Not the required version: \"" + 
version + "\"" );
                       return false;
                   }
               }
  @@ -627,7 +625,7 @@
           catch( SQLException e )
           {
               // Could not get the required information
  -            log( "Failed to obtain required RDBMS information", 
Project.MSG_ERR );
  +            getLogger().error( "Failed to obtain required RDBMS information" 
);
               return false;
           }
   
  @@ -653,8 +651,7 @@
               totalSql++;
               if( !statement.execute( sql ) )
               {
  -                log( statement.getUpdateCount() + " rows affected",
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( statement.getUpdateCount() + " rows 
affected" );
               }
               else
               {
  @@ -667,7 +664,7 @@
               SQLWarning warning = conn.getWarnings();
               while( warning != null )
               {
  -                log( warning + " sql warning", Project.MSG_VERBOSE );
  +                getLogger().debug( warning + " sql warning" );
                   warning = warning.getNextWarning();
               }
               conn.clearWarnings();
  @@ -675,10 +672,10 @@
           }
           catch( SQLException e )
           {
  -            log( "Failed to execute: " + sql, Project.MSG_ERR );
  +            getLogger().error( "Failed to execute: " + sql );
               if( !onError.equals( "continue" ) )
                   throw e;
  -            log( e.toString(), Project.MSG_ERR );
  +            getLogger().error( e.toString() );
           }
       }
   
  @@ -697,7 +694,7 @@
               rs = statement.getResultSet();
               if( rs != null )
               {
  -                log( "Processing new result set.", Project.MSG_VERBOSE );
  +                getLogger().debug( "Processing new result set." );
                   ResultSetMetaData md = rs.getMetaData();
                   int columnCount = md.getColumnCount();
                   StringBuffer line = new StringBuffer();
  @@ -781,7 +778,7 @@
                   if( delimiterType.equals( DelimiterType.NORMAL ) && 
sql.endsWith( delimiter ) ||
                       delimiterType.equals( DelimiterType.ROW ) && 
line.equals( delimiter ) )
                   {
  -                    log( "SQL: " + sql, Project.MSG_VERBOSE );
  +                    getLogger().debug( "SQL: " + sql );
                       execSQL( sql.substring( 0, sql.length() - 
delimiter.length() ), out );
                       sql = "";
                   }
  @@ -852,14 +849,13 @@
           {
               if( tSqlCommand.length() != 0 )
               {
  -                log( "Executing commands", Project.MSG_INFO );
  +                getLogger().info( "Executing commands" );
                   runStatements( new StringReader( tSqlCommand ), out );
               }
   
               if( tSrcFile != null )
               {
  -                log( "Executing file: " + tSrcFile.getAbsolutePath(),
  -                     Project.MSG_INFO );
  +                getLogger().info( "Executing file: " + 
tSrcFile.getAbsolutePath() );
                   Reader reader = ( encoding == null ) ? new FileReader( 
tSrcFile )
                       : new InputStreamReader( new FileInputStream( tSrcFile 
), encoding );
                   runStatements( reader, out );
  
  
  
  1.5       +2 -4      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Sleep.java
  
  Index: Sleep.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Sleep.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Sleep.java        2001/12/23 06:33:35     1.4
  +++ Sleep.java        2001/12/23 14:21:50     1.5
  @@ -8,7 +8,6 @@
   package org.apache.tools.ant.taskdefs;
   
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   
   /**
  @@ -128,8 +127,7 @@
           {
               validate();
               long sleepTime = getSleepTime();
  -            log( "sleeping for " + sleepTime + " milliseconds",
  -                 Project.MSG_VERBOSE );
  +            getLogger().debug( "sleeping for " + sleepTime + " milliseconds" 
);
               doSleep( sleepTime );
           }
           catch( Exception e )
  @@ -141,7 +139,7 @@
               else
               {
                   String text = e.toString();
  -                log( text, Project.MSG_ERR );
  +                getLogger().error( text );
               }
           }
       }
  
  
  
  1.8       +1 -2      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SendEmail.java
  
  Index: SendEmail.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SendEmail.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SendEmail.java    2001/12/23 06:33:35     1.7
  +++ SendEmail.java    2001/12/23 14:21:50     1.8
  @@ -16,7 +16,6 @@
   import java.util.Iterator;
   import java.util.StringTokenizer;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.mail.MailMessage;
   
  @@ -402,7 +401,7 @@
               }
               else
               {
  -                log( err, Project.MSG_ERR );
  +                getLogger().error( err );
               }
           }
       }
  
  
  
  1.15      +16 -19    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  
  Index: Rmic.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Rmic.java 2001/12/23 06:33:35     1.14
  +++ Rmic.java 2001/12/23 14:21:50     1.15
  @@ -15,7 +15,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.rmic.RmicAdapter;
   import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory;
   import org.apache.tools.ant.types.FilterSetCollection;
  @@ -474,19 +473,22 @@
           }
           catch( ClassNotFoundException e )
           {
  -            log( "Unable to verify class " + classname +
  -                 ". It could not be found.", Project.MSG_WARN );
  +            final String message = "Unable to verify class " + classname +
  +                ". It could not be found.";
  +            getLogger().warn( message );
           }
           catch( NoClassDefFoundError e )
           {
  -            log( "Unable to verify class " + classname +
  -                 ". It is not defined.", Project.MSG_WARN );
  +            final String message = "Unable to verify class " + classname +
  +                ". It is not defined.";
  +            getLogger().warn( message );
           }
           catch( Throwable t )
           {
  -            log( "Unable to verify class " + classname +
  -                 ". Loading caused Exception: " +
  -                 t.getMessage(), Project.MSG_WARN );
  +            final String message = "Unable to verify class " + classname +
  +                ". Loading caused Exception: " +
  +                t.getMessage();
  +            getLogger().warn( message );
           }
           // we only get here if an exception has been thrown
           return false;
  @@ -536,7 +538,7 @@
   
           if( verify )
           {
  -            log( "Verify has been turned on.", Project.MSG_INFO );
  +            getLogger().info( "Verify has been turned on." );
           }
   
           String compiler = getProject().getProperty( "build.rmic" );
  @@ -567,9 +569,7 @@
           int fileCount = compileList.size();
           if( fileCount > 0 )
           {
  -            log( "RMI Compiling " + fileCount +
  -                 " class" + ( fileCount > 1 ? "es" : "" ) + " to " + baseDir,
  -                 Project.MSG_INFO );
  +            getLogger().info( "RMI Compiling " + fileCount + " class" + ( 
fileCount > 1 ? "es" : "" ) + " to " + baseDir );
   
               // finally, lets execute the compiler!!
               if( !adapter.execute() )
  @@ -587,9 +587,8 @@
           {
               if( idl )
               {
  -                log( "Cannot determine sourcefiles in idl mode, ",
  -                     Project.MSG_WARN );
  -                log( "sourcebase attribute will be ignored.", 
Project.MSG_WARN );
  +                getLogger().warn( "Cannot determine sourcefiles in idl mode, 
" );
  +                getLogger().warn( "sourcebase attribute will be ignored." );
               }
               else
               {
  @@ -620,14 +619,12 @@
           String[] newFiles = files;
           if( idl )
           {
  -            log( "will leave uptodate test to rmic implementation in idl 
mode.",
  -                 Project.MSG_VERBOSE );
  +            getLogger().debug( "will leave uptodate test to rmic 
implementation in idl mode." );
           }
           else if( iiop
               && iiopopts != null && iiopopts.indexOf( "-always" ) > -1 )
           {
  -            log( "no uptodate test as -always option has been specified",
  -                 Project.MSG_VERBOSE );
  +            getLogger().debug( "no uptodate test as -always option has been 
specified" );
           }
           else
           {
  
  
  
  1.9       +3 -4      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Replace.java
  
  Index: Replace.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Replace.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Replace.java      2001/12/23 06:33:35     1.8
  +++ Replace.java      2001/12/23 14:21:50     1.9
  @@ -24,7 +24,6 @@
   import java.util.Properties;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   
   /**
    * Replaces all occurrences of one or more string tokens with given values in
  @@ -225,7 +224,7 @@
   
           if( summary )
           {
  -            log( "Replaced " + replaceCount + " occurrences in " + fileCount 
+ " files.", Project.MSG_INFO );
  +            getLogger().info( "Replaced " + replaceCount + " occurrences in 
" + fileCount + " files." );
           }
       }
   
  @@ -350,7 +349,7 @@
                   String tok = stringReplace( token.getText(), "\n", linesep );
   
                   // for each found token, replace with value
  -                log( "Replacing in " + src.getPath() + ": " + 
token.getText() + " --> " + value.getText(), Project.MSG_VERBOSE );
  +                getLogger().debug( "Replacing in " + src.getPath() + ": " + 
token.getText() + " --> " + value.getText() );
                   newString = stringReplace( newString, tok, val );
               }
   
  @@ -426,7 +425,7 @@
               Replacefilter filter = (Replacefilter)replacefilters.get( i );
   
               //for each found token, replace with value
  -            log( "Replacing in " + filename + ": " + filter.getToken() + " 
--> " + filter.getReplaceValue(), Project.MSG_VERBOSE );
  +            getLogger().debug( "Replacing in " + filename + ": " + 
filter.getToken() + " --> " + filter.getReplaceValue() );
               newString = stringReplace( newString, filter.getToken(), 
filter.getReplaceValue() );
           }
   
  
  
  
  1.7       +13 -10    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java
  
  Index: RecorderEntry.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RecorderEntry.java        2001/12/23 06:33:35     1.6
  +++ RecorderEntry.java        2001/12/23 14:21:50     1.7
  @@ -8,6 +8,7 @@
   package org.apache.tools.ant.taskdefs;
   
   import java.io.PrintStream;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.tools.ant.BuildEvent;
   import org.apache.tools.ant.BuildLogger;
   import org.apache.tools.ant.Project;
  @@ -19,7 +20,9 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">J D Glanville</a>
    * @version 0.5
    */
  -public class RecorderEntry implements BuildLogger
  +public class RecorderEntry
  +    extends AbstractLogEnabled
  +    implements BuildLogger
   {
       /**
        * the line separator for this OS
  @@ -126,7 +129,7 @@
   
       public void buildFinished( BuildEvent event )
       {
  -        log( "< BUILD FINISHED", Project.MSG_DEBUG );
  +        getLogger().debug( "< BUILD FINISHED" );
   
           Throwable error = event.getException();
           if( error == null )
  @@ -144,12 +147,12 @@
   
       public void buildStarted( BuildEvent event )
       {
  -        log( "> BUILD STARTED", Project.MSG_DEBUG );
  +        getLogger().debug( "> BUILD STARTED" );
       }
   
       public void messageLogged( BuildEvent event )
       {
  -        log( "--- MESSAGE LOGGED", Project.MSG_DEBUG );
  +        getLogger().debug( "--- MESSAGE LOGGED" );
   
           StringBuffer buf = new StringBuffer();
           if( event.getTask() != null )
  @@ -171,28 +174,28 @@
   
       public void targetFinished( BuildEvent event )
       {
  -        log( "<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG 
);
  +        getLogger().debug( "<< TARGET FINISHED -- " + event.getTarget() );
           String time = formatTime( System.currentTimeMillis() - 
targetStartTime );
  -        log( event.getTarget() + ":  duration " + time, Project.MSG_VERBOSE 
);
  +        getLogger().debug( event.getTarget() + ":  duration " + time );
           out.flush();
       }
   
       public void targetStarted( BuildEvent event )
       {
  -        log( ">> TARGET STARTED -- " + event.getTarget(), Project.MSG_DEBUG 
);
  -        log( LINE_SEP + event.getTarget().getName() + ":", Project.MSG_INFO 
);
  +        getLogger().debug( ">> TARGET STARTED -- " + event.getTarget() );
  +        getLogger().info( LINE_SEP + event.getTarget().getName() + ":" );
           targetStartTime = System.currentTimeMillis();
       }
   
       public void taskFinished( BuildEvent event )
       {
  -        log( "<<< TASK FINISHED -- " + event.getTask(), Project.MSG_DEBUG );
  +        getLogger().debug( "<<< TASK FINISHED -- " + event.getTask() );
           out.flush();
       }
   
       public void taskStarted( BuildEvent event )
       {
  -        log( ">>> TASK STARTED -- " + event.getTask(), Project.MSG_DEBUG );
  +        getLogger().debug( ">>> TASK STARTED -- " + event.getTask() );
       }
   
       /**
  
  
  
  1.17      +6 -8      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Property.java     2001/12/23 06:33:35     1.16
  +++ Property.java     2001/12/23 14:21:50     1.17
  @@ -18,7 +18,6 @@
   import org.apache.myrmidon.framework.exec.Environment;
   import org.apache.myrmidon.framework.exec.ExecException;
   import org.apache.tools.ant.AntClassLoader;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
  @@ -214,7 +213,7 @@
           if( !prefix.endsWith( "." ) )
               prefix += ".";
   
  -        log( "Loading EnvironmentData " + prefix, Project.MSG_VERBOSE );
  +        getLogger().debug( "Loading EnvironmentData " + prefix );
           try
           {
               final Properties environment = 
Environment.getNativeEnvironment();
  @@ -225,7 +224,7 @@
   
                   if( value.equals( "" ) )
                   {
  -                    log( "Ignoring: " + key, Project.MSG_WARN );
  +                    getLogger().warn( "Ignoring: " + key );
                   }
                   else
                   {
  @@ -249,7 +248,7 @@
           throws TaskException
       {
           Properties props = new Properties();
  -        log( "Loading " + file.getAbsolutePath(), Project.MSG_VERBOSE );
  +        getLogger().debug( "Loading " + file.getAbsolutePath() );
           try
           {
               if( file.exists() )
  @@ -270,8 +269,7 @@
               }
               else
               {
  -                log( "Unable to find property file: " + 
file.getAbsolutePath(),
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( "Unable to find property file: " + 
file.getAbsolutePath() );
               }
           }
           catch( IOException ex )
  @@ -284,7 +282,7 @@
           throws TaskException
       {
           Properties props = new Properties();
  -        log( "Resource Loading " + name, Project.MSG_VERBOSE );
  +        getLogger().debug( "Resource Loading " + name );
           try
           {
               ClassLoader cL = null;
  @@ -315,7 +313,7 @@
               }
               else
               {
  -                log( "Unable to find resource " + name, Project.MSG_WARN );
  +                getLogger().warn( "Unable to find resource " + name );
               }
           }
           catch( IOException ex )
  
  
  
  1.7       +1 -2      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  
  Index: PathConvert.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PathConvert.java  2001/12/23 06:33:35     1.6
  +++ PathConvert.java  2001/12/23 14:21:50     1.7
  @@ -10,7 +10,6 @@
   import java.io.File;
   import java.util.ArrayList;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
  @@ -224,7 +223,7 @@
           // Place the result into the specified property
           String value = rslt.toString();
   
  -        log( "Set property " + property + " = " + value, Project.MSG_VERBOSE 
);
  +        getLogger().debug( "Set property " + property + " = " + value );
   
           setProperty( property, value );
       }
  
  
  
  1.13      +9 -9      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Javac.java        2001/12/23 06:33:35     1.12
  +++ Javac.java        2001/12/23 14:21:50     1.13
  @@ -772,11 +772,11 @@
           {
   
               CompilerAdapter adapter = CompilerAdapterFactory.getCompiler(
  -                compiler, this );
  -            getLogger().info( "Compiling " + compileList.length +
  -                              " source file"
  -                              + ( compileList.length == 1 ? "" : "s" )
  -                              + ( destDir != null ? " to " + destDir : "" ) 
);
  +                compiler, getLogger() );
  +            final String message = "Compiling " + compileList.length + " 
source file" +
  +                ( compileList.length == 1 ? "" : "s" ) +
  +                ( destDir != null ? " to " + destDir : "" );
  +            getLogger().info( message );
   
               // now we need to populate the compiler adapter
               adapter.setJavac( this );
  @@ -790,7 +790,7 @@
                   }
                   else
                   {
  -                    log( FAIL_MSG, Project.MSG_ERR );
  +                    getLogger().error( FAIL_MSG );
                   }
               }
           }
  @@ -877,13 +877,13 @@
               {
                   if( isJdkCompiler( compiler ) )
                   {
  -                    log( "Since fork is true, ignoring build.compiler 
setting.",
  -                         Project.MSG_WARN );
  +                    final String message = "Since fork is true, ignoring 
build.compiler setting.";
  +                    getLogger().warn( message );
                       compiler = "extJavac";
                   }
                   else
                   {
  -                    log( "Since build.compiler setting isn't classic or 
modern, ignoring fork setting.", Project.MSG_WARN );
  +                    getLogger().warn( "Since build.compiler setting isn't 
classic or modern, ignoring fork setting." );
                   }
               }
               else
  
  
  
  1.15      +5 -6      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
  
  Index: Java.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Java.java 2001/12/23 06:33:35     1.14
  +++ Java.java 2001/12/23 14:21:50     1.15
  @@ -226,7 +226,7 @@
               }
               else
               {
  -                log( "Java Result: " + err, Project.MSG_ERR );
  +                getLogger().error( "Java Result: " + err );
               }
           }
       }
  @@ -253,7 +253,7 @@
   
           if( fork )
           {
  -            log( "Forking " + cmdl.toString(), Project.MSG_VERBOSE );
  +            getLogger().debug( "Forking " + cmdl.toString() );
   
               return run( cmdl.getCommandline() );
           }
  @@ -261,15 +261,14 @@
           {
               if( cmdl.getVmCommand().size() > 1 )
               {
  -                log( "JVM args ignored when same JVM is used.", 
Project.MSG_WARN );
  +                getLogger().warn( "JVM args ignored when same JVM is used." 
);
               }
               if( dir != null )
               {
  -                log( "Working directory ignored when same JVM is used.", 
Project.MSG_WARN );
  +                getLogger().warn( "Working directory ignored when same JVM 
is used." );
               }
   
  -            log( "Running in same VM " + cmdl.getJavaCommand().toString(),
  -                 Project.MSG_VERBOSE );
  +            getLogger().debug( "Running in same VM " + 
cmdl.getJavaCommand().toString() );
               run( cmdl );
               return 0;
           }
  
  
  
  1.8       +13 -13    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Jar.java  2001/12/23 06:33:35     1.7
  +++ Jar.java  2001/12/23 14:21:50     1.8
  @@ -21,7 +21,6 @@
   import java.util.Iterator;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.FileScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.ZipFileSet;
   import org.apache.tools.zip.ZipOutputStream;
   
  @@ -96,7 +95,7 @@
           }
           catch( ManifestException e )
           {
  -            log( "Manifest is invalid: " + e.getMessage(), Project.MSG_ERR );
  +            getLogger().error( "Manifest is invalid: " + e.getMessage() );
               throw new TaskException( "Invalid Manifest: " + manifestFile, e 
);
           }
           catch( IOException e )
  @@ -121,8 +120,8 @@
   
       public void setWhenempty( WhenEmpty we )
       {
  -        log( "JARs are never empty, they contain at least a manifest file",
  -             Project.MSG_WARN );
  +        final String message = "JARs are never empty, they contain at least 
a manifest file";
  +        getLogger().warn( message );
       }
   
       public void addConfiguredManifest( Manifest newManifest )
  @@ -165,7 +164,7 @@
                   java.util.zip.ZipEntry entry = theZipFile.getEntry( 
"META-INF/MANIFEST.MF" );
                   if( entry == null )
                   {
  -                    log( "Updating jar since the current jar has no 
manifest", Project.MSG_VERBOSE );
  +                    getLogger().debug( "Updating jar since the current jar 
has no manifest" );
                       return false;
                   }
                   Manifest currentManifest = new Manifest( new 
InputStreamReader( theZipFile.getInputStream( entry ) ) );
  @@ -175,15 +174,14 @@
                   }
                   if( !currentManifest.equals( manifest ) )
                   {
  -                    log( "Updating jar since jar manifest has changed", 
Project.MSG_VERBOSE );
  +                    getLogger().debug( "Updating jar since jar manifest has 
changed" );
                       return false;
                   }
               }
               catch( Exception e )
               {
                   // any problems and we will rebuild
  -                log( "Updating jar since cannot read current jar manifest: " 
+ e.getClass().getName() + e.getMessage(),
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( "Updating jar since cannot read current 
jar manifest: " + e.getClass().getName() + e.getMessage() );
                   return false;
               }
               finally
  @@ -245,7 +243,7 @@
               }
               for( Iterator e = execManifest.getWarnings(); e.hasNext(); )
               {
  -                log( "Manifest warning: " + (String)e.next(), 
Project.MSG_WARN );
  +                getLogger().warn( "Manifest warning: " + (String)e.next() );
               }
   
               zipDir( null, zOut, "META-INF/" );
  @@ -261,7 +259,7 @@
           }
           catch( ManifestException e )
           {
  -            log( "Manifest is invalid: " + e.getMessage(), Project.MSG_ERR );
  +            getLogger().error( "Manifest is invalid: " + e.getMessage() );
               throw new TaskException( "Invalid Manifest", e );
           }
       }
  @@ -275,8 +273,10 @@
           // a <fileset> element.
           if( vPath.equalsIgnoreCase( "META-INF/MANIFEST.MF" ) )
           {
  -            log( "Warning: selected " + archiveType + " files include a 
META-INF/MANIFEST.MF which will be ignored " +
  -                 "(please use manifest attribute to " + archiveType + " 
task)", Project.MSG_WARN );
  +            final String message = "Warning: selected " + archiveType +
  +                " files include a META-INF/MANIFEST.MF which will be ignored 
" +
  +                "(please use manifest attribute to " + archiveType + " 
task)";
  +            getLogger().warn( message );
           }
           else
           {
  @@ -388,7 +388,7 @@
           }
           catch( ManifestException e )
           {
  -            log( "Manifest is invalid: " + e.getMessage(), Project.MSG_ERR );
  +            getLogger().error( "Manifest is invalid: " + e.getMessage() );
               throw new TaskException( "Invalid Manifest", e );
           }
       }
  
  
  
  1.9       +3 -4      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java
  
  Index: Input.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Input.java        2001/12/23 06:33:35     1.8
  +++ Input.java        2001/12/23 14:21:50     1.9
  @@ -13,7 +13,6 @@
   import java.util.ArrayList;
   import java.util.StringTokenizer;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   
   /**
  @@ -110,7 +109,7 @@
                   accept.add( stok.nextToken() );
               }
           }
  -        log( message, Project.MSG_WARN );
  +        getLogger().warn( message );
           if( input == null )
           {
               try
  @@ -121,7 +120,7 @@
                   {
                       while( !accept.contains( input ) )
                       {
  -                        log( message, Project.MSG_WARN );
  +                        getLogger().warn( message );
                           input = in.readLine();
                       }
                   }
  @@ -149,7 +148,7 @@
               }
               else
               {
  -                log( "Override ignored for " + addproperty, 
Project.MSG_VERBOSE );
  +                getLogger().debug( "Override ignored for " + addproperty );
               }
           }
       }
  
  
  
  1.10      +14 -17    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  
  Index: FixCRLF.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FixCRLF.java      2001/12/23 06:33:35     1.9
  +++ FixCRLF.java      2001/12/23 14:21:50     1.10
  @@ -23,7 +23,6 @@
   import java.util.NoSuchElementException;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.EnumeratedAttribute;
   import org.apache.tools.ant.util.FileUtils;
   
  @@ -66,7 +65,7 @@
    *
    * @author Sam Ruby <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Peter B. West</a>
  - * @version $Revision: 1.9 $ $Name:  $
  + * @version $Revision: 1.10 $ $Name:  $
    */
   
   public class FixCRLF extends MatchingTask
  @@ -321,14 +320,13 @@
           }
   
           // log options used
  -        log( "options:" +
  -             " eol=" +
  -             ( eol == ASIS ? "asis" : eol == CR ? "cr" : eol == LF ? "lf" : 
"crlf" ) +
  -             " tab=" + ( tabs == TABS ? "add" : tabs == ASIS ? "asis" : 
"remove" ) +
  -             " eof=" + ( ctrlz == ADD ? "add" : ctrlz == ASIS ? "asis" : 
"remove" ) +
  -             " tablength=" + tablength +
  -             " encoding=" + ( encoding == null ? "default" : encoding ),
  -             Project.MSG_VERBOSE );
  +        getLogger().debug( "options:" +
  +                           " eol=" +
  +                           ( eol == ASIS ? "asis" : eol == CR ? "cr" : eol 
== LF ? "lf" : "crlf" ) +
  +                           " tab=" + ( tabs == TABS ? "add" : tabs == ASIS ? 
"asis" : "remove" ) +
  +                           " eof=" + ( ctrlz == ADD ? "add" : ctrlz == ASIS 
? "asis" : "remove" ) +
  +                           " tablength=" + tablength +
  +                           " encoding=" + ( encoding == null ? "default" : 
encoding ) );
   
           DirectoryScanner ds = super.getDirectoryScanner( srcDir );
           String[] files = ds.getIncludedFiles();
  @@ -758,10 +756,10 @@
               if( destFile.exists() )
               {
                   // Compare the destination with the temp file
  -                log( "destFile exists", Project.MSG_DEBUG );
  +                getLogger().debug( "destFile exists" );
                   if( !FileUtils.contentEquals( destFile, tmpFile ) )
                   {
  -                    log( destFile + " is being written", Project.MSG_DEBUG );
  +                    getLogger().debug( destFile + " is being written" );
                       if( !destFile.delete() )
                       {
                           throw new TaskException( "Unable to delete "
  @@ -779,9 +777,7 @@
                   }
                   else
                   {// destination is equal to temp file
  -                    log( destFile +
  -                         " is not written, as the contents are identical",
  -                         Project.MSG_DEBUG );
  +                    getLogger().debug( destFile + " is not written, as the 
contents are identical" );
                       if( !tmpFile.delete() )
                       {
                           throw new TaskException( "Unable to delete "
  @@ -791,7 +787,8 @@
               }
               else
               {// destFile does not exist - write the temp file
  -                log( "destFile does not exist", Project.MSG_DEBUG );
  +                ///XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  +                getLogger().debug( "destFile does not exist" );
                   if( !tmpFile.renameTo( destFile ) )
                   {
                       throw new TaskException(
  @@ -820,7 +817,7 @@
               }
               catch( IOException io )
               {
  -                log( "Error closing " + srcFile, Project.MSG_ERR );
  +                getLogger().error( "Error closing " + srcFile );
               }// end of catch
   
               if( tmpFile != null )
  
  
  
  1.6       +1 -2      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Filter.java
  
  Index: Filter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Filter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Filter.java       2001/12/23 06:33:35     1.5
  +++ Filter.java       2001/12/23 14:21:50     1.6
  @@ -9,7 +9,6 @@
   
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   
   /**
  @@ -69,7 +68,7 @@
       protected void readFilters()
           throws TaskException
       {
  -        log( "Reading filters from " + filtersFile, Project.MSG_VERBOSE );
  +        getLogger().debug( "Reading filters from " + filtersFile );
           getProject().getGlobalFilterSet().readFiltersFromFile( filtersFile );
       }
   }
  
  
  
  1.12      +4 -7      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Expand.java
  
  Index: Expand.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Expand.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Expand.java       2001/12/23 06:33:35     1.11
  +++ Expand.java       2001/12/23 14:21:50     1.12
  @@ -20,7 +20,6 @@
   import org.apache.avalon.excalibur.io.FileUtil;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.PatternSet;
   
  @@ -166,7 +165,7 @@
                                ze.isDirectory() );
               }
   
  -            log( "expand complete", Project.MSG_VERBOSE );
  +            getLogger().debug( "expand complete" );
           }
           catch( IOException ioe )
           {
  @@ -241,13 +240,11 @@
               if( !overwrite && f.exists()
                   && f.lastModified() >= entryDate.getTime() )
               {
  -                log( "Skipping " + f + " as it is up-to-date",
  -                     Project.MSG_DEBUG );
  +                getLogger().debug( "Skipping " + f + " as it is up-to-date" 
);
                   return;
               }
   
  -            log( "expanding " + entryName + " to " + f,
  -                 Project.MSG_VERBOSE );
  +            getLogger().debug( "expanding " + entryName + " to " + f );
               // create intermediary directories - sometimes zip don't add them
               File dirF = f.getParentFile();
               dirF.mkdirs();
  @@ -293,7 +290,7 @@
           }
           catch( FileNotFoundException ex )
           {
  -            log( "Unable to expand to file " + f.getPath(), Project.MSG_WARN 
);
  +            getLogger().warn( "Unable to expand to file " + f.getPath() );
           }
   
       }
  
  
  
  1.16      +3 -7      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  
  Index: ExecuteOn.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ExecuteOn.java    2001/12/23 06:33:35     1.15
  +++ ExecuteOn.java    2001/12/23 14:21:50     1.16
  @@ -13,7 +13,6 @@
   import java.util.Hashtable;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.exec.ExecTask;
   import org.apache.tools.ant.taskdefs.exec.Execute;
   import org.apache.tools.ant.types.Commandline;
  @@ -412,8 +411,7 @@
   
                   if( fileNames.size() == 0 && skipEmpty )
                   {
  -                    log( "Skipping fileset for directory "
  -                         + base + ". It is empty.", Project.MSG_INFO );
  +                    getLogger().info( "Skipping fileset for directory " + 
base + ". It is empty." );
                       continue;
                   }
   
  @@ -424,8 +422,7 @@
                       for( int j = 0; j < s.length; j++ )
                       {
                           String[] command = getCommandline( s[ j ], base );
  -                        log( "Executing " + Commandline.toString( command ),
  -                             Project.MSG_VERBOSE );
  +                        getLogger().debug( "Executing " + 
Commandline.toString( command ) );
                           exe.setCommandline( command );
                           runExecute( exe );
                       }
  @@ -441,8 +438,7 @@
                   File[] b = new File[ baseDirs.size() ];
                   b = (File[])baseDirs.toArray( b );
                   String[] command = getCommandline( s, b );
  -                log( "Executing " + Commandline.toString( command ),
  -                     Project.MSG_VERBOSE );
  +                getLogger().debug( "Executing " + Commandline.toString( 
command ) );
                   exe.setCommandline( command );
                   runExecute( exe );
               }
  
  
  
  1.7       +5 -4      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java
  
  Index: Ear.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Ear.java  2001/12/23 06:33:35     1.6
  +++ Ear.java  2001/12/23 14:21:50     1.7
  @@ -10,7 +10,6 @@
   import java.io.File;
   import java.io.IOException;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.ZipFileSet;
   import org.apache.tools.zip.ZipOutputStream;
   
  @@ -52,7 +51,7 @@
       {
           // We just set the prefix for this fileset, and pass it up.
           // Do we need to do this? LH
  -        log( "addArchives called", Project.MSG_DEBUG );
  +        getLogger().debug( "addArchives called" );
           fs.setPrefix( "/" );
           super.addFileset( fs );
       }
  @@ -90,8 +89,10 @@
           {
               if( deploymentDescriptor == null || 
!deploymentDescriptor.equals( file ) || descriptorAdded )
               {
  -                log( "Warning: selected " + archiveType + " files include a 
META-INF/application.xml which will be ignored " +
  -                     "(please use appxml attribute to " + archiveType + " 
task)", Project.MSG_WARN );
  +                final String message = "Warning: selected " + archiveType +
  +                    " files include a META-INF/application.xml which will be 
ignored " +
  +                    "(please use appxml attribute to " + archiveType + " 
task)";
  +                getLogger().warn( message );
               }
               else
               {
  
  
  
  1.7       +11 -18    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/DependSet.java
  
  Index: DependSet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/DependSet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DependSet.java    2001/12/23 06:33:35     1.6
  +++ DependSet.java    2001/12/23 14:21:50     1.7
  @@ -14,7 +14,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Os;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.FileList;
   import org.apache.tools.ant.types.FileSet;
   
  @@ -60,7 +59,7 @@
    *
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Craeg Strong</a>
  - * @version $Revision: 1.6 $ $Date: 2001/12/23 06:33:35 $
  + * @version $Revision: 1.7 $ $Date: 2001/12/23 14:21:50 $
    */
   public class DependSet extends MatchingTask
   {
  @@ -166,8 +165,7 @@
   
                   if( dest.lastModified() > now )
                   {
  -                    log( "Warning: " + targetFiles[ i ] + " modified in the 
future.",
  -                         Project.MSG_WARN );
  +                    getLogger().warn( "Warning: " + targetFiles[ i ] + " 
modified in the future." );
                   }
               }
           }
  @@ -189,7 +187,7 @@
                   File dest = new File( targetFL.getDir( getProject() ), 
targetFiles[ i ] );
                   if( !dest.exists() )
                   {
  -                    log( targetFiles[ i ] + " does not exist.", 
Project.MSG_VERBOSE );
  +                    getLogger().debug( targetFiles[ i ] + " does not exist." 
);
                       upToDate = false;
                       continue;
                   }
  @@ -199,8 +197,7 @@
                   }
                   if( dest.lastModified() > now )
                   {
  -                    log( "Warning: " + targetFiles[ i ] + " modified in the 
future.",
  -                         Project.MSG_WARN );
  +                    getLogger().warn( "Warning: " + targetFiles[ i ] + " 
modified in the future." );
                   }
               }
           }
  @@ -224,8 +221,7 @@
   
                       if( src.lastModified() > now )
                       {
  -                        log( "Warning: " + sourceFiles[ i ] + " modified in 
the future.",
  -                             Project.MSG_WARN );
  +                        getLogger().warn( "Warning: " + sourceFiles[ i ] + " 
modified in the future." );
                       }
   
                       Iterator enumTargets = allTargets.iterator();
  @@ -235,8 +231,7 @@
                           File dest = (File)enumTargets.next();
                           if( src.lastModified() > dest.lastModified() )
                           {
  -                            log( dest.getPath() + " is out of date with 
respect to " +
  -                                 sourceFiles[ i ], Project.MSG_VERBOSE );
  +                            getLogger().debug( dest.getPath() + " is out of 
date with respect to " + sourceFiles[ i ] );
                               upToDate = false;
   
                           }
  @@ -264,13 +259,12 @@
   
                       if( src.lastModified() > now )
                       {
  -                        log( "Warning: " + sourceFiles[ i ] + " modified in 
the future.",
  -                             Project.MSG_WARN );
  +                        getLogger().warn( "Warning: " + sourceFiles[ i ] + " 
modified in the future." );
                       }
   
                       if( !src.exists() )
                       {
  -                        log( sourceFiles[ i ] + " does not exist.", 
Project.MSG_VERBOSE );
  +                        getLogger().debug( sourceFiles[ i ] + " does not 
exist." );
                           upToDate = false;
                           break;
                       }
  @@ -283,8 +277,7 @@
   
                           if( src.lastModified() > dest.lastModified() )
                           {
  -                            log( dest.getPath() + " is out of date with 
respect to " +
  -                                 sourceFiles[ i ], Project.MSG_VERBOSE );
  +                            getLogger().debug( dest.getPath() + " is out of 
date with respect to " + sourceFiles[ i ] );
                               upToDate = false;
   
                           }
  @@ -295,11 +288,11 @@
   
           if( !upToDate )
           {
  -            log( "Deleting all target files. ", Project.MSG_VERBOSE );
  +            getLogger().debug( "Deleting all target files. " );
               for( Iterator e = allTargets.iterator(); e.hasNext(); )
               {
                   File fileToRemove = (File)e.next();
  -                log( "Deleting file " + fileToRemove.getAbsolutePath(), 
Project.MSG_VERBOSE );
  +                getLogger().debug( "Deleting file " + 
fileToRemove.getAbsolutePath() );
                   fileToRemove.delete();
               }
           }
  
  
  
  1.11      +1 -3      
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  
  Index: Checksum.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Checksum.java     2001/12/23 06:33:35     1.10
  +++ Checksum.java     2001/12/23 14:21:50     1.11
  @@ -22,7 +22,6 @@
   import java.util.Hashtable;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.condition.Condition;
   import org.apache.tools.ant.types.FileSet;
   
  @@ -215,8 +214,7 @@
                       }
                       else
                       {
  -                        log( file + " omitted as " + dest + " is up to 
date.",
  -                             Project.MSG_VERBOSE );
  +                        getLogger().debug( file + " omitted as " + dest + " 
is up to date." );
                       }
                   }
                   else
  
  
  
  1.10      +13 -14    
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
  
  Index: Available.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Available.java    2001/12/23 06:33:35     1.9
  +++ Available.java    2001/12/23 14:21:50     1.10
  @@ -10,7 +10,6 @@
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.AntClassLoader;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.condition.Condition;
   import org.apache.tools.ant.types.EnumeratedAttribute;
  @@ -136,7 +135,7 @@
   
           if( ( classname != null ) && !checkClass( classname ) )
           {
  -            log( "Unable to load class " + classname + " to set property " + 
property, Project.MSG_VERBOSE );
  +            getLogger().debug( "Unable to load class " + classname + " to 
set property " + property );
               return false;
           }
   
  @@ -144,18 +143,18 @@
           {
               if( type != null )
               {
  -                log( "Unable to find " + type + " " + file + " to set 
property " + property, Project.MSG_VERBOSE );
  +                getLogger().debug( "Unable to find " + type + " " + file + " 
to set property " + property );
               }
               else
               {
  -                log( "Unable to find " + file + " to set property " + 
property, Project.MSG_VERBOSE );
  +                getLogger().debug( "Unable to find " + file + " to set 
property " + property );
               }
               return false;
           }
   
           if( ( resource != null ) && !checkResource( resource ) )
           {
  -            log( "Unable to load resource " + resource + " to set property " 
+ property, Project.MSG_VERBOSE );
  +            getLogger().debug( "Unable to load resource " + resource + " to 
set property " + property );
               return false;
           }
   
  @@ -232,7 +231,7 @@
               String[] paths = filepath.list();
               for( int i = 0; i < paths.length; ++i )
               {
  -                log( "Searching " + paths[ i ], Project.MSG_DEBUG );
  +                getLogger().debug( "Searching " + paths[ i ] );
                   /*
                    * filepath can be a list of directory and/or
                    * file names (gen'd via <fileset>)
  @@ -254,19 +253,19 @@
                   {
                       if( type == null )
                       {
  -                        log( "Found: " + path, Project.MSG_VERBOSE );
  +                        getLogger().debug( "Found: " + path );
                           return true;
                       }
                       else if( type.isDir()
                           && path.isDirectory() )
                       {
  -                        log( "Found directory: " + path, Project.MSG_VERBOSE 
);
  +                        getLogger().debug( "Found directory: " + path );
                           return true;
                       }
                       else if( type.isFile()
                           && path.isFile() )
                       {
  -                        log( "Found file: " + path, Project.MSG_VERBOSE );
  +                        getLogger().debug( "Found file: " + path );
                           return true;
                       }
                       // not the requested type
  @@ -280,12 +279,12 @@
                   {
                       if( type == null )
                       {
  -                        log( "Found: " + parent, Project.MSG_VERBOSE );
  +                        getLogger().debug( "Found: " + parent );
                           return true;
                       }
                       else if( type.isDir() )
                       {
  -                        log( "Found directory: " + parent, 
Project.MSG_VERBOSE );
  +                        getLogger().debug( "Found directory: " + parent );
                           return true;
                       }
                       // not the requested type
  @@ -338,7 +337,7 @@
               {
                   if( f.isDirectory() )
                   {
  -                    log( "Found directory: " + text, Project.MSG_VERBOSE );
  +                    getLogger().debug( "Found directory: " + text );
                   }
                   return f.isDirectory();
               }
  @@ -346,14 +345,14 @@
               {
                   if( f.isFile() )
                   {
  -                    log( "Found file: " + text, Project.MSG_VERBOSE );
  +                    getLogger().debug( "Found file: " + text );
                   }
                   return f.isFile();
               }
           }
           if( f.exists() )
           {
  -            log( "Found: " + text, Project.MSG_VERBOSE );
  +            getLogger().debug( "Found: " + text );
           }
           return f.exists();
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to