git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270208 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -22,7 +22,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
| public abstract class ProjectComponent | public abstract class ProjectComponent | ||||
| extends AbstractTask | extends AbstractTask | ||||
| { | { | ||||
| protected Project project = null; | |||||
| protected Project project; | |||||
| /** | /** | ||||
| * Sets the project object of this component. This method is used by project | * Sets the project object of this component. This method is used by project | ||||
| @@ -58,16 +58,6 @@ public abstract class ProjectComponent | |||||
| return FileUtils.newFileUtils().resolveFile( project.getBaseDir(), name ); | return FileUtils.newFileUtils().resolveFile( project.getBaseDir(), name ); | ||||
| } | } | ||||
| /** | |||||
| * Log a message with the default (INFO) priority. | |||||
| * | |||||
| * @param msg Description of Parameter | |||||
| */ | |||||
| public void log( String msg ) | |||||
| { | |||||
| log( msg, Project.MSG_INFO ); | |||||
| } | |||||
| /** | /** | ||||
| * Log a mesage with the give priority. | * Log a mesage with the give priority. | ||||
| * | * | ||||
| @@ -36,16 +36,6 @@ public abstract class Task | |||||
| { | { | ||||
| } | } | ||||
| /** | |||||
| * Log a message with the default (INFO) priority. | |||||
| * | |||||
| * @param msg Description of Parameter | |||||
| */ | |||||
| public void log( String msg ) | |||||
| { | |||||
| log( msg, Project.MSG_INFO ); | |||||
| } | |||||
| /** | /** | ||||
| * Log a mesage with the give priority. | * Log a mesage with the give priority. | ||||
| * | * | ||||
| @@ -36,7 +36,7 @@ public class BUnzip2 extends Unpack | |||||
| { | { | ||||
| if( source.lastModified() > dest.lastModified() ) | if( source.lastModified() > dest.lastModified() ) | ||||
| { | { | ||||
| log( "Expanding " + source.getAbsolutePath() + " to " | |||||
| getLogger().info( "Expanding " + source.getAbsolutePath() + " to " | |||||
| + dest.getAbsolutePath() ); | + dest.getAbsolutePath() ); | ||||
| FileOutputStream out = null; | FileOutputStream out = null; | ||||
| @@ -230,7 +230,7 @@ public class Checksum extends MatchingTask implements Condition | |||||
| String message = "Could not find file " | String message = "Could not find file " | ||||
| + file.getAbsolutePath() | + file.getAbsolutePath() | ||||
| + " to generate checksum for."; | + " to generate checksum for."; | ||||
| log( message ); | |||||
| getLogger().info( message ); | |||||
| throw new TaskException( message ); | throw new TaskException( message ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -256,7 +256,7 @@ public class Checksum extends MatchingTask implements Condition | |||||
| File src = (File)e.nextElement(); | File src = (File)e.nextElement(); | ||||
| if( !isCondition ) | if( !isCondition ) | ||||
| { | { | ||||
| log( "Calculating " + algorithm + " checksum for " + src ); | |||||
| getLogger().info( "Calculating " + algorithm + " checksum for " + src ); | |||||
| } | } | ||||
| fis = new FileInputStream( src ); | fis = new FileInputStream( src ); | ||||
| DigestInputStream dis = new DigestInputStream( fis, | DigestInputStream dis = new DigestInputStream( fis, | ||||
| @@ -243,7 +243,7 @@ public class Copy extends Task | |||||
| { | { | ||||
| String message = "Could not find file " | String message = "Could not find file " | ||||
| + file.getAbsolutePath() + " to copy."; | + file.getAbsolutePath() + " to copy."; | ||||
| log( message ); | |||||
| getLogger().info( message ); | |||||
| throw new TaskException( message ); | throw new TaskException( message ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -334,7 +334,7 @@ public class Copy extends Task | |||||
| { | { | ||||
| if( fileCopyMap.size() > 0 ) | if( fileCopyMap.size() > 0 ) | ||||
| { | { | ||||
| log( "Copying " + fileCopyMap.size() + | |||||
| getLogger().info( "Copying " + fileCopyMap.size() + | |||||
| " file" + ( fileCopyMap.size() == 1 ? "" : "s" ) + | " file" + ( fileCopyMap.size() == 1 ? "" : "s" ) + | ||||
| " to " + destDir.getAbsolutePath() ); | " to " + destDir.getAbsolutePath() ); | ||||
| @@ -397,7 +397,7 @@ public class Copy extends Task | |||||
| if( count > 0 ) | if( count > 0 ) | ||||
| { | { | ||||
| log( "Copied " + count + | |||||
| getLogger().info( "Copied " + count + | |||||
| " empty director" + | " empty director" + | ||||
| ( count == 1 ? "y" : "ies" ) + | ( count == 1 ? "y" : "ies" ) + | ||||
| " to " + destDir.getAbsolutePath() ); | " to " + destDir.getAbsolutePath() ); | ||||
| @@ -239,7 +239,7 @@ public class Delete extends MatchingTask | |||||
| { | { | ||||
| if( usedMatchingTask ) | if( usedMatchingTask ) | ||||
| { | { | ||||
| log( "DEPRECATED - Use of the implicit FileSet is deprecated. Use a nested fileset element instead." ); | |||||
| getLogger().info( "DEPRECATED - Use of the implicit FileSet is deprecated. Use a nested fileset element instead." ); | |||||
| } | } | ||||
| if( file == null && dir == null && filesets.size() == 0 ) | if( file == null && dir == null && filesets.size() == 0 ) | ||||
| @@ -259,11 +259,11 @@ public class Delete extends MatchingTask | |||||
| { | { | ||||
| if( file.isDirectory() ) | if( file.isDirectory() ) | ||||
| { | { | ||||
| log( "Directory " + file.getAbsolutePath() + " cannot be removed using the file attribute. Use dir instead." ); | |||||
| getLogger().info( "Directory " + file.getAbsolutePath() + " cannot be removed using the file attribute. Use dir instead." ); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| log( "Deleting: " + file.getAbsolutePath() ); | |||||
| getLogger().info( "Deleting: " + file.getAbsolutePath() ); | |||||
| if( !file.delete() ) | if( !file.delete() ) | ||||
| { | { | ||||
| @@ -294,7 +294,7 @@ public class Delete extends MatchingTask | |||||
| */ | */ | ||||
| if( verbosity == Project.MSG_VERBOSE ) | if( verbosity == Project.MSG_VERBOSE ) | ||||
| { | { | ||||
| log( "Deleting directory " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Deleting directory " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| removeDir( dir ); | removeDir( dir ); | ||||
| } | } | ||||
| @@ -408,7 +408,7 @@ public class Delete extends MatchingTask | |||||
| { | { | ||||
| if( files.length > 0 ) | if( files.length > 0 ) | ||||
| { | { | ||||
| log( "Deleting " + files.length + " files from " + d.getAbsolutePath() ); | |||||
| getLogger().info( "Deleting " + files.length + " files from " + d.getAbsolutePath() ); | |||||
| for( int j = 0; j < files.length; j++ ) | for( int j = 0; j < files.length; j++ ) | ||||
| { | { | ||||
| File f = new File( d, files[ j ] ); | File f = new File( d, files[ j ] ); | ||||
| @@ -454,7 +454,7 @@ public class Delete extends MatchingTask | |||||
| if( dirCount > 0 ) | if( dirCount > 0 ) | ||||
| { | { | ||||
| log( "Deleted " + dirCount + " director" + | |||||
| getLogger().info( "Deleted " + dirCount + " director" + | |||||
| ( dirCount == 1 ? "y" : "ies" ) + | ( dirCount == 1 ? "y" : "ies" ) + | ||||
| " from " + d.getAbsolutePath() ); | " from " + d.getAbsolutePath() ); | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ public class GUnzip extends Unpack | |||||
| { | { | ||||
| if( source.lastModified() > dest.lastModified() ) | if( source.lastModified() > dest.lastModified() ) | ||||
| { | { | ||||
| log( "Expanding " + source.getAbsolutePath() + " to " | |||||
| getLogger().info( "Expanding " + source.getAbsolutePath() + " to " | |||||
| + dest.getAbsolutePath() ); | + dest.getAbsolutePath() ); | ||||
| FileOutputStream out = null; | FileOutputStream out = null; | ||||
| @@ -160,7 +160,7 @@ public class GenerateKey | |||||
| throw new TaskException( "dname must be set" ); | throw new TaskException( "dname must be set" ); | ||||
| } | } | ||||
| log( "Generating Key for " + alias ); | |||||
| getLogger().info( "Generating Key for " + alias ); | |||||
| final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | ||||
| cmd.setExecutable( "keytool" ); | cmd.setExecutable( "keytool" ); | ||||
| @@ -151,7 +151,7 @@ public class Get extends Task | |||||
| try | try | ||||
| { | { | ||||
| log( "Getting: " + source ); | |||||
| getLogger().info( "Getting: " + source ); | |||||
| //set the timestamp to the file date. | //set the timestamp to the file date. | ||||
| long timestamp = 0; | long timestamp = 0; | ||||
| @@ -163,7 +163,7 @@ public class Get extends Task | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| Date t = new Date( timestamp ); | Date t = new Date( timestamp ); | ||||
| log( "local file date : " + t.toString() ); | |||||
| getLogger().info( "local file date : " + t.toString() ); | |||||
| } | } | ||||
| hasTimestamp = true; | hasTimestamp = true; | ||||
| @@ -209,13 +209,13 @@ public class Get extends Task | |||||
| //not modified so no file download. just return instead | //not modified so no file download. just return instead | ||||
| //and trace out something so the user doesn't think that the | //and trace out something so the user doesn't think that the | ||||
| //download happened when it didnt | //download happened when it didnt | ||||
| log( "Not modified - so not downloaded" ); | |||||
| getLogger().info( "Not modified - so not downloaded" ); | |||||
| return; | return; | ||||
| } | } | ||||
| // test for 401 result (HTTP only) | // test for 401 result (HTTP only) | ||||
| if( httpConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED ) | if( httpConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED ) | ||||
| { | { | ||||
| log( "Not authorized - check " + dest + " for details" ); | |||||
| getLogger().info( "Not authorized - check " + dest + " for details" ); | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -237,12 +237,12 @@ public class Get extends Task | |||||
| } | } | ||||
| catch( IOException ex ) | catch( IOException ex ) | ||||
| { | { | ||||
| log( "Error opening connection " + ex ); | |||||
| getLogger().info( "Error opening connection " + ex ); | |||||
| } | } | ||||
| } | } | ||||
| if( is == null ) | if( is == null ) | ||||
| { | { | ||||
| log( "Can't get " + source + " to " + dest ); | |||||
| getLogger().info( "Can't get " + source + " to " + dest ); | |||||
| if( ignoreErrors ) | if( ignoreErrors ) | ||||
| return; | return; | ||||
| throw new TaskException( "Can't get " + source + " to " + dest ); | throw new TaskException( "Can't get " + source + " to " + dest ); | ||||
| @@ -270,7 +270,7 @@ public class Get extends Task | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| Date t = new Date( remoteTimestamp ); | Date t = new Date( remoteTimestamp ); | ||||
| log( "last modified = " + t.toString() | |||||
| getLogger().info( "last modified = " + t.toString() | |||||
| + ( ( remoteTimestamp == 0 ) ? " - using current time instead" : "" ) ); | + ( ( remoteTimestamp == 0 ) ? " - using current time instead" : "" ) ); | ||||
| } | } | ||||
| if( remoteTimestamp != 0 ) | if( remoteTimestamp != 0 ) | ||||
| @@ -279,7 +279,7 @@ public class Get extends Task | |||||
| } | } | ||||
| catch( IOException ioe ) | catch( IOException ioe ) | ||||
| { | { | ||||
| log( "Error getting " + source + " to " + dest ); | |||||
| getLogger().info( "Error getting " + source + " to " + dest ); | |||||
| if( ignoreErrors ) | if( ignoreErrors ) | ||||
| return; | return; | ||||
| throw new TaskException( "Error", ioe ); | throw new TaskException( "Error", ioe ); | ||||
| @@ -774,7 +774,7 @@ public class Javac extends MatchingTask | |||||
| CompilerAdapter adapter = CompilerAdapterFactory.getCompiler( | CompilerAdapter adapter = CompilerAdapterFactory.getCompiler( | ||||
| compiler, this ); | compiler, this ); | ||||
| log( "Compiling " + compileList.length + | |||||
| getLogger().info( "Compiling " + compileList.length + | |||||
| " source file" | " source file" | ||||
| + ( compileList.length == 1 ? "" : "s" ) | + ( compileList.length == 1 ? "" : "s" ) | ||||
| + ( destDir != null ? " to " + destDir : "" ) ); | + ( destDir != null ? " to " + destDir : "" ) ); | ||||
| @@ -49,7 +49,7 @@ public class Mkdir extends Task | |||||
| "successful for an unknown reason"; | "successful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -105,7 +105,7 @@ public class Move extends Copy | |||||
| } | } | ||||
| if( fileCopyMap.size() > 0 ) | if( fileCopyMap.size() > 0 ) | ||||
| {// files to move | {// files to move | ||||
| log( "Moving " + fileCopyMap.size() + " files to " + | |||||
| getLogger().info( "Moving " + fileCopyMap.size() + " files to " + | |||||
| destDir.getAbsolutePath() ); | destDir.getAbsolutePath() ); | ||||
| Enumeration e = fileCopyMap.keys(); | Enumeration e = fileCopyMap.keys(); | ||||
| @@ -200,7 +200,7 @@ public class Move extends Copy | |||||
| if( count > 0 ) | if( count > 0 ) | ||||
| { | { | ||||
| log( "Moved " + count + " empty directories to " + destDir.getAbsolutePath() ); | |||||
| getLogger().info( "Moved " + count + " empty directories to " + destDir.getAbsolutePath() ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -41,7 +41,7 @@ public abstract class Pack extends Task | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| validate(); | validate(); | ||||
| log( "Building: " + zipFile.getAbsolutePath() ); | |||||
| getLogger().info( "Building: " + zipFile.getAbsolutePath() ); | |||||
| pack(); | pack(); | ||||
| } | } | ||||
| @@ -579,7 +579,7 @@ public class SQLExec extends Task | |||||
| } | } | ||||
| } | } | ||||
| log( goodSql + " of " + totalSql + | |||||
| getLogger().info( goodSql + " of " + totalSql + | |||||
| " SQL statements executed successfully" ); | " SQL statements executed successfully" ); | ||||
| } | } | ||||
| @@ -390,7 +390,7 @@ public class SendEmail extends Task | |||||
| throw new TaskException( "Attribute \"file\" or \"message\" is required." ); | throw new TaskException( "Attribute \"file\" or \"message\" is required." ); | ||||
| } | } | ||||
| log( "Sending email" ); | |||||
| getLogger().info( "Sending email" ); | |||||
| mailMessage.sendAndClose(); | mailMessage.sendAndClose(); | ||||
| } | } | ||||
| catch( IOException ioe ) | catch( IOException ioe ) | ||||
| @@ -326,7 +326,7 @@ public class SignJar extends Task | |||||
| cmd.createArg().setValue( alias ); | cmd.createArg().setValue( alias ); | ||||
| log( "Signing Jar : " + jarSource.getAbsolutePath() ); | |||||
| getLogger().info( "Signing Jar : " + jarSource.getAbsolutePath() ); | |||||
| cmd.setFailonerror( true ); | cmd.setFailonerror( true ); | ||||
| cmd.execute(); | cmd.execute(); | ||||
| } | } | ||||
| @@ -445,7 +445,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger | |||||
| styleSheetLastModified > outFile.lastModified() ) | styleSheetLastModified > outFile.lastModified() ) | ||||
| { | { | ||||
| ensureDirectoryFor( outFile ); | ensureDirectoryFor( outFile ); | ||||
| log( "Processing " + inFile + " to " + outFile ); | |||||
| getLogger().info( "Processing " + inFile + " to " + outFile ); | |||||
| configureLiaison( stylesheet ); | configureLiaison( stylesheet ); | ||||
| liaison.transform( inFile, outFile ); | liaison.transform( inFile, outFile ); | ||||
| @@ -276,7 +276,7 @@ public class Zip extends MatchingTask | |||||
| String action = doUpdate ? "Updating " : "Building "; | String action = doUpdate ? "Updating " : "Building "; | ||||
| log( action + archiveType + ": " + zipFile.getAbsolutePath() ); | |||||
| getLogger().info( action + archiveType + ": " + zipFile.getAbsolutePath() ); | |||||
| boolean success = false; | boolean success = false; | ||||
| try | try | ||||
| @@ -117,7 +117,7 @@ public class Cab extends MatchingTask | |||||
| if( isUpToDate( files ) ) | if( isUpToDate( files ) ) | ||||
| return; | return; | ||||
| log( "Building " + archiveType + ": " + cabFile.getAbsolutePath() ); | |||||
| getLogger().info( "Building " + archiveType + ": " + cabFile.getAbsolutePath() ); | |||||
| if( !Os.isFamily( "windows" ) ) | if( !Os.isFamily( "windows" ) ) | ||||
| { | { | ||||
| @@ -527,7 +527,7 @@ public class IContract extends MatchingTask | |||||
| { | { | ||||
| if( !controlFile.exists() ) | if( !controlFile.exists() ) | ||||
| { | { | ||||
| log( "WARNING: Control file " + controlFile.getAbsolutePath() + " doesn't exist. iContract will be run without control file." ); | |||||
| getLogger().info( "WARNING: Control file " + controlFile.getAbsolutePath() + " doesn't exist. iContract will be run without control file." ); | |||||
| } | } | ||||
| this.controlFile = controlFile; | this.controlFile = controlFile; | ||||
| } | } | ||||
| @@ -710,7 +710,7 @@ public class IContract extends MatchingTask | |||||
| // issue warning if pre,post or invariant is used together with controlfile | // issue warning if pre,post or invariant is used together with controlfile | ||||
| if( ( pre || post || invariant ) && controlFile != null ) | if( ( pre || post || invariant ) && controlFile != null ) | ||||
| { | { | ||||
| log( "WARNING: specifying pre,post or invariant will override control file settings" ); | |||||
| getLogger().info( "WARNING: specifying pre,post or invariant will override control file settings" ); | |||||
| } | } | ||||
| @@ -796,7 +796,7 @@ public class IContract extends MatchingTask | |||||
| } | } | ||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| log( "File icontrol.properties not found. That's ok. Writing a default one." ); | |||||
| getLogger().info( "File icontrol.properties not found. That's ok. Writing a default one." ); | |||||
| } | } | ||||
| iControlProps.setProperty( "sourceRoot", srcDir.getAbsolutePath() ); | iControlProps.setProperty( "sourceRoot", srcDir.getAbsolutePath() ); | ||||
| iControlProps.setProperty( "classRoot", classDir.getAbsolutePath() ); | iControlProps.setProperty( "classRoot", classDir.getAbsolutePath() ); | ||||
| @@ -807,11 +807,11 @@ public class IContract extends MatchingTask | |||||
| try | try | ||||
| {// to read existing propertiesfile | {// to read existing propertiesfile | ||||
| iControlProps.store( new FileOutputStream( "icontrol.properties" ), ICONTROL_PROPERTIES_HEADER ); | iControlProps.store( new FileOutputStream( "icontrol.properties" ), ICONTROL_PROPERTIES_HEADER ); | ||||
| log( "Updated icontrol.properties" ); | |||||
| getLogger().info( "Updated icontrol.properties" ); | |||||
| } | } | ||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| log( "Couldn't write icontrol.properties." ); | |||||
| getLogger().info( "Couldn't write icontrol.properties." ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -821,9 +821,9 @@ public class IContract extends MatchingTask | |||||
| { | { | ||||
| if( iContractMissing ) | if( iContractMissing ) | ||||
| { | { | ||||
| log( "iContract can't be found on your classpath. Your classpath is:" ); | |||||
| log( classpath.toString() ); | |||||
| log( "If you don't have the iContract jar, go get it at http://www.reliable-systems.com/tools/" ); | |||||
| getLogger().info( "iContract can't be found on your classpath. Your classpath is:" ); | |||||
| getLogger().info( classpath.toString() ); | |||||
| getLogger().info( "If you don't have the iContract jar, go get it at http://www.reliable-systems.com/tools/" ); | |||||
| } | } | ||||
| throw new TaskException( "iContract instrumentation failed. Code=" + result ); | throw new TaskException( "iContract instrumentation failed. Code=" + result ); | ||||
| } | } | ||||
| @@ -948,17 +948,17 @@ public class IContract extends MatchingTask | |||||
| if( targets == null ) | if( targets == null ) | ||||
| { | { | ||||
| targets = new File( "targets" ); | targets = new File( "targets" ); | ||||
| log( "Warning: targets file not specified. generating file: " + targets.getName() ); | |||||
| getLogger().info( "Warning: targets file not specified. generating file: " + targets.getName() ); | |||||
| writeTargets = true; | writeTargets = true; | ||||
| } | } | ||||
| else if( !targets.exists() ) | else if( !targets.exists() ) | ||||
| { | { | ||||
| log( "Specified targets file doesn't exist. generating file: " + targets.getName() ); | |||||
| getLogger().info( "Specified targets file doesn't exist. generating file: " + targets.getName() ); | |||||
| writeTargets = true; | writeTargets = true; | ||||
| } | } | ||||
| if( writeTargets ) | if( writeTargets ) | ||||
| { | { | ||||
| log( "You should consider using iControl to create a target file." ); | |||||
| getLogger().info( "You should consider using iControl to create a target file." ); | |||||
| targetOutputStream = new FileOutputStream( targets ); | targetOutputStream = new FileOutputStream( targets ); | ||||
| targetPrinter = new PrintStream( targetOutputStream ); | targetPrinter = new PrintStream( targetOutputStream ); | ||||
| } | } | ||||
| @@ -1018,7 +1018,7 @@ public class IContract extends MatchingTask | |||||
| { | { | ||||
| if( !dirty ) | if( !dirty ) | ||||
| { | { | ||||
| log( "Control file " + controlFile.getAbsolutePath() + " has been updated. Instrumenting all files..." ); | |||||
| getLogger().info( "Control file " + controlFile.getAbsolutePath() + " has been updated. Instrumenting all files..." ); | |||||
| } | } | ||||
| dirty = true; | dirty = true; | ||||
| instrumentall = true; | instrumentall = true; | ||||
| @@ -459,7 +459,7 @@ public class Javah extends Task | |||||
| public void setName( String name ) | public void setName( String name ) | ||||
| { | { | ||||
| this.name = name; | this.name = name; | ||||
| log( "ClassArgument.name=" + name ); | |||||
| getLogger().info( "ClassArgument.name=" + name ); | |||||
| } | } | ||||
| public String getName() | public String getName() | ||||
| @@ -186,7 +186,7 @@ public class ManifestFile extends Task | |||||
| if( manifestFile.exists() ) | if( manifestFile.exists() ) | ||||
| { | { | ||||
| this.log( "update existing manifest file " + manifestFile.getAbsolutePath() ); | |||||
| getLogger().info( "update existing manifest file " + manifestFile.getAbsolutePath() ); | |||||
| if( container != null ) | if( container != null ) | ||||
| { | { | ||||
| @@ -234,7 +234,7 @@ public class ManifestFile extends Task | |||||
| try | try | ||||
| { | { | ||||
| manifestFile.delete(); | manifestFile.delete(); | ||||
| log( "Replacing or creating new manifest file " + manifestFile.getAbsolutePath() ); | |||||
| getLogger().info( "Replacing or creating new manifest file " + manifestFile.getAbsolutePath() ); | |||||
| if( manifestFile.createNewFile() ) | if( manifestFile.createNewFile() ) | ||||
| { | { | ||||
| FileOutputStream fos = new FileOutputStream( manifestFile ); | FileOutputStream fos = new FileOutputStream( manifestFile ); | ||||
| @@ -163,7 +163,7 @@ public class Native2Ascii extends MatchingTask | |||||
| } | } | ||||
| String message = "Converting " + count + " file" | String message = "Converting " + count + " file" | ||||
| + ( count != 1 ? "s" : "" ) + " from "; | + ( count != 1 ? "s" : "" ) + " from "; | ||||
| log( message + srcDir + " to " + destDir ); | |||||
| getLogger().info( message + srcDir + " to " + destDir ); | |||||
| for( int i = 0; i < files.length; i++ ) | for( int i = 0; i < files.length; i++ ) | ||||
| { | { | ||||
| convert( files[ i ], m.mapFileName( files[ i ] )[ 0 ] ); | convert( files[ i ], m.mapFileName( files[ i ] )[ 0 ] ); | ||||
| @@ -500,7 +500,7 @@ public class NetRexxC extends MatchingTask | |||||
| // compile the source files | // compile the source files | ||||
| if( compileList.size() > 0 ) | if( compileList.size() > 0 ) | ||||
| { | { | ||||
| log( "Compiling " + compileList.size() + " source file" | |||||
| getLogger().info( "Compiling " + compileList.size() + " source file" | |||||
| + ( compileList.size() == 1 ? "" : "s" ) | + ( compileList.size() == 1 ? "" : "s" ) | ||||
| + " to " + destDir ); | + " to " + destDir ); | ||||
| doNetRexxCompile(); | doNetRexxCompile(); | ||||
| @@ -610,7 +610,7 @@ public class NetRexxC extends MatchingTask | |||||
| { | { | ||||
| if( filecopyList.size() > 0 ) | if( filecopyList.size() > 0 ) | ||||
| { | { | ||||
| log( "Copying " + filecopyList.size() + " file" | |||||
| getLogger().info( "Copying " + filecopyList.size() + " file" | |||||
| + ( filecopyList.size() == 1 ? "" : "s" ) | + ( filecopyList.size() == 1 ? "" : "s" ) | ||||
| + " to " + destDir.getAbsolutePath() ); | + " to " + destDir.getAbsolutePath() ); | ||||
| Enumeration enum = filecopyList.keys(); | Enumeration enum = filecopyList.keys(); | ||||
| @@ -228,7 +228,7 @@ public class PropertyFile extends Task | |||||
| { | { | ||||
| if( m_propertyfile.exists() ) | if( m_propertyfile.exists() ) | ||||
| { | { | ||||
| log( "Updating property file: " + m_propertyfile.getAbsolutePath() ); | |||||
| getLogger().info( "Updating property file: " + m_propertyfile.getAbsolutePath() ); | |||||
| FileInputStream fis = null; | FileInputStream fis = null; | ||||
| try | try | ||||
| { | { | ||||
| @@ -246,7 +246,7 @@ public class PropertyFile extends Task | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| log( "Creating new property file: " + | |||||
| getLogger().info( "Creating new property file: " + | |||||
| m_propertyfile.getAbsolutePath() ); | m_propertyfile.getAbsolutePath() ); | ||||
| FileOutputStream out = null; | FileOutputStream out = null; | ||||
| try | try | ||||
| @@ -198,7 +198,7 @@ public class Rpm extends Task | |||||
| try | try | ||||
| { | { | ||||
| exe.execute(); | exe.execute(); | ||||
| log( "Building the RPM based on the " + specFile + " file" ); | |||||
| getLogger().info( "Building the RPM based on the " + specFile + " file" ); | |||||
| } | } | ||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| @@ -270,7 +270,7 @@ public class XMLValidateTask extends Task | |||||
| fileProcessed++; | fileProcessed++; | ||||
| } | } | ||||
| } | } | ||||
| log( fileProcessed + " file(s) have been successfully validated." ); | |||||
| getLogger().info( fileProcessed + " file(s) have been successfully validated." ); | |||||
| } | } | ||||
| protected EntityResolver getEntityResolver() | protected EntityResolver getEntityResolver() | ||||
| @@ -308,7 +308,7 @@ public class Depend extends MatchingTask | |||||
| int count = deleteAllAffectedFiles(); | int count = deleteAllAffectedFiles(); | ||||
| long duration = ( System.currentTimeMillis() - start ) / 1000; | long duration = ( System.currentTimeMillis() - start ) / 1000; | ||||
| log( "Deleted " + count + " out of date files in " + duration + " seconds" ); | |||||
| getLogger().info( "Deleted " + count + " out of date files in " + duration + " seconds" ); | |||||
| } | } | ||||
| catch( Exception e ) | catch( Exception e ) | ||||
| { | { | ||||
| @@ -682,7 +682,7 @@ public class CSharp | |||||
| //get dependencies list. | //get dependencies list. | ||||
| DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | ||||
| String[] dependencies = scanner.getIncludedFiles(); | String[] dependencies = scanner.getIncludedFiles(); | ||||
| log( "compiling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| getLogger().info( "compiling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| String baseDir = scanner.getBasedir().toString(); | String baseDir = scanner.getBasedir().toString(); | ||||
| //add to the command | //add to the command | ||||
| for( int i = 0; i < dependencies.length; i++ ) | for( int i = 0; i < dependencies.length; i++ ) | ||||
| @@ -312,7 +312,7 @@ public class Ilasm | |||||
| //get dependencies list. | //get dependencies list. | ||||
| DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | ||||
| String[] dependencies = scanner.getIncludedFiles(); | String[] dependencies = scanner.getIncludedFiles(); | ||||
| log( "assembling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| getLogger().info( "assembling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| String baseDir = scanner.getBasedir().toString(); | String baseDir = scanner.getBasedir().toString(); | ||||
| //add to the command | //add to the command | ||||
| for( int i = 0; i < dependencies.length; i++ ) | for( int i = 0; i < dependencies.length; i++ ) | ||||
| @@ -146,7 +146,7 @@ public class NetCommand | |||||
| { | { | ||||
| if( _traceCommandLine ) | if( _traceCommandLine ) | ||||
| { | { | ||||
| _owner.log( _commandLine.toString() ); | |||||
| //_owner.getLogger().info( _commandLine.toString() ); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -132,11 +132,11 @@ public class BorlandGenerateClient extends Task | |||||
| if( mode == null ) | if( mode == null ) | ||||
| { | { | ||||
| log( "mode is null default mode is java" ); | |||||
| getLogger().info( "mode is null default mode is java" ); | |||||
| setMode( JAVA_MODE ); | setMode( JAVA_MODE ); | ||||
| }// end of if () | }// end of if () | ||||
| log( "client jar file is " + clientjarfile ); | |||||
| getLogger().info( "client jar file is " + clientjarfile ); | |||||
| if( mode.equalsIgnoreCase( FORK_MODE ) ) | if( mode.equalsIgnoreCase( FORK_MODE ) ) | ||||
| { | { | ||||
| @@ -158,7 +158,7 @@ public class BorlandGenerateClient extends Task | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| log( "mode : fork" ); | |||||
| getLogger().info( "mode : fork" ); | |||||
| org.apache.tools.ant.taskdefs.ExecTask execTask = null; | org.apache.tools.ant.taskdefs.ExecTask execTask = null; | ||||
| execTask = (ExecTask)getProject().createTask( "exec" ); | execTask = (ExecTask)getProject().createTask( "exec" ); | ||||
| @@ -203,7 +203,7 @@ public class BorlandGenerateClient extends Task | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| log( "mode : java" ); | |||||
| getLogger().info( "mode : java" ); | |||||
| org.apache.tools.ant.taskdefs.Java execTask = null; | org.apache.tools.ant.taskdefs.Java execTask = null; | ||||
| execTask = (Java)getProject().createTask( "java" ); | execTask = (Java)getProject().createTask( "java" ); | ||||
| @@ -166,7 +166,7 @@ public class JJTree extends Task | |||||
| targetName.substring( 0, targetName.indexOf( ".jjt" ) ) + ".jj" ); | targetName.substring( 0, targetName.indexOf( ".jjt" ) ) + ".jj" ); | ||||
| if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | ||||
| { | { | ||||
| log( "Target is already built - skipping (" + target + ")" ); | |||||
| getLogger().info( "Target is already built - skipping (" + target + ")" ); | |||||
| return; | return; | ||||
| } | } | ||||
| cmdl.createArgument().setValue( target.getAbsolutePath() ); | cmdl.createArgument().setValue( target.getAbsolutePath() ); | ||||
| @@ -344,7 +344,7 @@ public class JDependTask extends Task | |||||
| } | } | ||||
| if( getOutputFile() != null ) | if( getOutputFile() != null ) | ||||
| log( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| getLogger().info( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| log( "Executing: " + commandline.toString(), Project.MSG_VERBOSE ); | log( "Executing: " + commandline.toString(), Project.MSG_VERBOSE ); | ||||
| try | try | ||||
| { | { | ||||
| @@ -389,11 +389,11 @@ public class JDependTask extends Task | |||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| String msg = "JDepend Failed when creating the output file: " + e.getMessage(); | String msg = "JDepend Failed when creating the output file: " + e.getMessage(); | ||||
| log( msg ); | |||||
| getLogger().info( msg ); | |||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| jdepend.setWriter( new PrintWriter( fw ) ); | jdepend.setWriter( new PrintWriter( fw ) ); | ||||
| log( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| getLogger().info( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| } | } | ||||
| PathTokenizer sourcesPath = new PathTokenizer( getSourcespath().toString() ); | PathTokenizer sourcesPath = new PathTokenizer( getSourcespath().toString() ); | ||||
| @@ -405,7 +405,7 @@ public class JDependTask extends Task | |||||
| if( !f.exists() || !f.isDirectory() ) | if( !f.exists() || !f.isDirectory() ) | ||||
| { | { | ||||
| String msg = "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail."; | String msg = "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail."; | ||||
| log( msg ); | |||||
| getLogger().info( msg ); | |||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| try | try | ||||
| @@ -415,7 +415,7 @@ public class JDependTask extends Task | |||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| String msg = "JDepend Failed when adding a source directory: " + e.getMessage(); | String msg = "JDepend Failed when adding a source directory: " + e.getMessage(); | ||||
| log( msg ); | |||||
| getLogger().info( msg ); | |||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -157,7 +157,7 @@ public class JlinkTask extends MatchingTask | |||||
| { | { | ||||
| throw new TaskException( "addfiles or mergefiles required! Please set." ); | throw new TaskException( "addfiles or mergefiles required! Please set." ); | ||||
| } | } | ||||
| log( "linking: " + outfile.getPath() ); | |||||
| getLogger().info( "linking: " + outfile.getPath() ); | |||||
| log( "compression: " + compress, Project.MSG_VERBOSE ); | log( "compression: " + compress, Project.MSG_VERBOSE ); | ||||
| jlink linker = new jlink(); | jlink linker = new jlink(); | ||||
| linker.setOutfile( outfile.getPath() ); | linker.setOutfile( outfile.getPath() ); | ||||
| @@ -388,7 +388,7 @@ public class JspC extends MatchingTask | |||||
| CompilerAdapter adapter = | CompilerAdapter adapter = | ||||
| CompilerAdapterFactory.getCompiler( compiler, this ); | CompilerAdapterFactory.getCompiler( compiler, this ); | ||||
| log( "Compiling " + compileList.size() + | |||||
| getLogger().info( "Compiling " + compileList.size() + | |||||
| " source file" | " source file" | ||||
| + ( compileList.size() == 1 ? "" : "s" ) | + ( compileList.size() == 1 ? "" : "s" ) | ||||
| + ( destDir != null ? " to " + destDir : "" ) ); | + ( destDir != null ? " to " + destDir : "" ) ); | ||||
| @@ -197,7 +197,7 @@ public class WLJspc extends MatchingTask | |||||
| args[ j++ ] = compileClasspath.toString(); | args[ j++ ] = compileClasspath.toString(); | ||||
| this.scanDir( files ); | this.scanDir( files ); | ||||
| log( "Compiling " + filesToDo.size() + " JSP files" ); | |||||
| getLogger().info( "Compiling " + filesToDo.size() + " JSP files" ); | |||||
| for( int i = 0; i < filesToDo.size(); i++ ) | for( int i = 0; i < filesToDo.size(); i++ ) | ||||
| { | { | ||||
| @@ -134,7 +134,7 @@ public class AggregateTransformer | |||||
| throw new TaskException( "Errors while applying transformations", e ); | throw new TaskException( "Errors while applying transformations", e ); | ||||
| } | } | ||||
| final long dt = System.currentTimeMillis() - t0; | final long dt = System.currentTimeMillis() - t0; | ||||
| task.log( "Transform time: " + dt + "ms" ); | |||||
| //task.getLogger().info( "Transform time: " + dt + "ms" ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -62,7 +62,7 @@ abstract class XalanExecutor | |||||
| } | } | ||||
| } | } | ||||
| String version = getXalanVersion( procVersion ); | String version = getXalanVersion( procVersion ); | ||||
| caller.task.log( "Using Xalan version: " + version ); | |||||
| //caller.task.getLogger().info( "Using Xalan version: " + version ); | |||||
| executor.setCaller( caller ); | executor.setCaller( caller ); | ||||
| return executor; | return executor; | ||||
| } | } | ||||
| @@ -301,7 +301,7 @@ public class MParse extends Task | |||||
| File javaFile = new File( pathname ); | File javaFile = new File( pathname ); | ||||
| if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | ||||
| { | { | ||||
| log( "Target is already build - skipping (" + target + ")" ); | |||||
| getLogger().info( "Target is already build - skipping (" + target + ")" ); | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -372,7 +372,7 @@ public class MParse extends Task | |||||
| final File sunjj = new File( target.getParent(), name ); | final File sunjj = new File( target.getParent(), name ); | ||||
| if( sunjj.exists() ) | if( sunjj.exists() ) | ||||
| { | { | ||||
| log( "Removing stale file: " + sunjj.getName() ); | |||||
| getLogger().info( "Removing stale file: " + sunjj.getName() ); | |||||
| sunjj.delete(); | sunjj.delete(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -352,7 +352,7 @@ public class FTP | |||||
| ftp.getReplyString() ); | ftp.getReplyString() ); | ||||
| } | } | ||||
| } | } | ||||
| log( ACTION_STRS[ action ] + " files" ); | |||||
| getLogger().info( ACTION_STRS[ action ] + " files" ); | |||||
| transferFiles( ftp ); | transferFiles( ftp ); | ||||
| } | } | ||||
| @@ -405,7 +405,7 @@ public class FTP | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "transferring " + filename + " to " + file.getAbsolutePath() ); | |||||
| getLogger().info( "transferring " + filename + " to " + file.getAbsolutePath() ); | |||||
| } | } | ||||
| File pdir = new File( file.getParent() );// stay 1.1 compatible | File pdir = new File( file.getParent() );// stay 1.1 compatible | ||||
| @@ -595,7 +595,7 @@ public class FTP | |||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "deleting " + filename ); | |||||
| getLogger().info( "deleting " + filename ); | |||||
| } | } | ||||
| if( !ftp.deleteFile( resolveFile( filename ) ) ) | if( !ftp.deleteFile( resolveFile( filename ) ) ) | ||||
| @@ -636,7 +636,7 @@ public class FTP | |||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "listing " + filename ); | |||||
| getLogger().info( "listing " + filename ); | |||||
| } | } | ||||
| FTPFile ftpfile = ftp.listFiles( resolveFile( filename ) )[ 0 ]; | FTPFile ftpfile = ftp.listFiles( resolveFile( filename ) )[ 0 ]; | ||||
| @@ -659,7 +659,7 @@ public class FTP | |||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "creating directory: " + dir ); | |||||
| getLogger().info( "creating directory: " + dir ); | |||||
| } | } | ||||
| if( !ftp.makeDirectory( dir ) ) | if( !ftp.makeDirectory( dir ) ) | ||||
| @@ -677,14 +677,14 @@ public class FTP | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "directory already exists" ); | |||||
| getLogger().info( "directory already exists" ); | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "directory created OK" ); | |||||
| getLogger().info( "directory created OK" ); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -733,7 +733,7 @@ public class FTP | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "transferring " + file.getAbsolutePath() ); | |||||
| getLogger().info( "transferring " + file.getAbsolutePath() ); | |||||
| } | } | ||||
| instream = new BufferedInputStream( new FileInputStream( file ) ); | instream = new BufferedInputStream( new FileInputStream( file ) ); | ||||
| @@ -907,10 +907,10 @@ public class FTP | |||||
| } | } | ||||
| } | } | ||||
| log( transferred + " files " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| getLogger().info( transferred + " files " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| if( skipped != 0 ) | if( skipped != 0 ) | ||||
| { | { | ||||
| log( skipped + " files were not successfully " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| getLogger().info( skipped + " files were not successfully " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -334,7 +334,7 @@ public class MimeMail extends Task | |||||
| }// for i | }// for i | ||||
| msg.setContent( attachments ); | msg.setContent( attachments ); | ||||
| log( "sending email " ); | |||||
| getLogger().info( "sending email " ); | |||||
| Transport.send( msg ); | Transport.send( msg ); | ||||
| } | } | ||||
| @@ -621,7 +621,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| // send the message to the project log. | // send the message to the project log. | ||||
| // Tell how many files were checked out. | // Tell how many files were checked out. | ||||
| log( checkedOut + " files checked out." ); | |||||
| getLogger().info( checkedOut + " files checked out." ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -856,7 +856,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| strFolder = strFolder.substring( i + 1 ); | strFolder = strFolder.substring( i + 1 ); | ||||
| } | } | ||||
| log( " Folder: \"" + strFolder + "\"" ); | |||||
| getLogger().info( " Folder: \"" + strFolder + "\"" ); | |||||
| prevFolder = f; | prevFolder = f; | ||||
| // If we displayed the project, view, item type, or folder, | // If we displayed the project, view, item type, or folder, | ||||
| @@ -867,7 +867,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| header.append( ",\t" ).append( p2.getDisplayName() ); | header.append( ",\t" ).append( p2.getDisplayName() ); | ||||
| } | } | ||||
| log( header.toString() ); | |||||
| getLogger().info( header.toString() ); | |||||
| } | } | ||||
| // Finally, show the Item properties ... | // Finally, show the Item properties ... | ||||
| @@ -896,7 +896,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| itemLine.append( ",\tNot locked" ); | itemLine.append( ",\tNot locked" ); | ||||
| } | } | ||||
| log( itemLine.toString() ); | |||||
| getLogger().info( itemLine.toString() ); | |||||
| } | } | ||||
| // END VERBOSE ONLY | // END VERBOSE ONLY | ||||
| @@ -936,7 +936,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| if( getVerbose() ) | if( getVerbose() ) | ||||
| { | { | ||||
| log( "Found " + getProjectName() + delim + getViewName() + delim ); | |||||
| getLogger().info( "Found " + getProjectName() + delim + getViewName() + delim ); | |||||
| } | } | ||||
| runType( s, p, v, s.typeForName( (String)s.getTypeNames().FILE ) ); | runType( s, p, v, s.typeForName( (String)s.getTypeNames().FILE ) ); | ||||
| break; | break; | ||||
| @@ -960,7 +960,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| if( getVerbose() ) | if( getVerbose() ) | ||||
| { | { | ||||
| log( "Found " + getProjectName() + delim ); | |||||
| getLogger().info( "Found " + getProjectName() + delim ); | |||||
| } | } | ||||
| runProject( s, p ); | runProject( s, p ); | ||||
| break; | break; | ||||
| @@ -997,7 +997,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| if( getVerbose() && getFolderName() != null ) | if( getVerbose() && getFolderName() != null ) | ||||
| { | { | ||||
| log( "Found " + getProjectName() + delim + getViewName() + | |||||
| getLogger().info( "Found " + getProjectName() + delim + getViewName() + | |||||
| delim + getFolderName() + delim + "\n" ); | delim + getFolderName() + delim + "\n" ); | ||||
| } | } | ||||
| @@ -333,7 +333,7 @@ public class CovReport extends Task | |||||
| } | } | ||||
| if( reference != null && !"xml".equals( format ) ) | if( reference != null && !"xml".equals( format ) ) | ||||
| { | { | ||||
| log( "Ignored reference. It cannot be used in non XML report." ); | |||||
| getLogger().info( "Ignored reference. It cannot be used in non XML report." ); | |||||
| reference = null;// nullify it so that there is no ambiguity | reference = null;// nullify it so that there is no ambiguity | ||||
| } | } | ||||
| @@ -154,7 +154,7 @@ public class MSVSSCHECKIN extends MSVSS | |||||
| "succesful for an unknown reason"; | "succesful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | ||||
| @@ -181,7 +181,7 @@ public class MSVSSCHECKOUT extends MSVSS | |||||
| "succesful for an unknown reason"; | "succesful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | ||||
| @@ -389,7 +389,7 @@ public class MSVSSGET extends MSVSS | |||||
| "successful for an unknown reason"; | "successful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | ||||
| @@ -22,7 +22,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
| public abstract class ProjectComponent | public abstract class ProjectComponent | ||||
| extends AbstractTask | extends AbstractTask | ||||
| { | { | ||||
| protected Project project = null; | |||||
| protected Project project; | |||||
| /** | /** | ||||
| * Sets the project object of this component. This method is used by project | * Sets the project object of this component. This method is used by project | ||||
| @@ -58,16 +58,6 @@ public abstract class ProjectComponent | |||||
| return FileUtils.newFileUtils().resolveFile( project.getBaseDir(), name ); | return FileUtils.newFileUtils().resolveFile( project.getBaseDir(), name ); | ||||
| } | } | ||||
| /** | |||||
| * Log a message with the default (INFO) priority. | |||||
| * | |||||
| * @param msg Description of Parameter | |||||
| */ | |||||
| public void log( String msg ) | |||||
| { | |||||
| log( msg, Project.MSG_INFO ); | |||||
| } | |||||
| /** | /** | ||||
| * Log a mesage with the give priority. | * Log a mesage with the give priority. | ||||
| * | * | ||||
| @@ -36,16 +36,6 @@ public abstract class Task | |||||
| { | { | ||||
| } | } | ||||
| /** | |||||
| * Log a message with the default (INFO) priority. | |||||
| * | |||||
| * @param msg Description of Parameter | |||||
| */ | |||||
| public void log( String msg ) | |||||
| { | |||||
| log( msg, Project.MSG_INFO ); | |||||
| } | |||||
| /** | /** | ||||
| * Log a mesage with the give priority. | * Log a mesage with the give priority. | ||||
| * | * | ||||
| @@ -36,7 +36,7 @@ public class BUnzip2 extends Unpack | |||||
| { | { | ||||
| if( source.lastModified() > dest.lastModified() ) | if( source.lastModified() > dest.lastModified() ) | ||||
| { | { | ||||
| log( "Expanding " + source.getAbsolutePath() + " to " | |||||
| getLogger().info( "Expanding " + source.getAbsolutePath() + " to " | |||||
| + dest.getAbsolutePath() ); | + dest.getAbsolutePath() ); | ||||
| FileOutputStream out = null; | FileOutputStream out = null; | ||||
| @@ -230,7 +230,7 @@ public class Checksum extends MatchingTask implements Condition | |||||
| String message = "Could not find file " | String message = "Could not find file " | ||||
| + file.getAbsolutePath() | + file.getAbsolutePath() | ||||
| + " to generate checksum for."; | + " to generate checksum for."; | ||||
| log( message ); | |||||
| getLogger().info( message ); | |||||
| throw new TaskException( message ); | throw new TaskException( message ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -256,7 +256,7 @@ public class Checksum extends MatchingTask implements Condition | |||||
| File src = (File)e.nextElement(); | File src = (File)e.nextElement(); | ||||
| if( !isCondition ) | if( !isCondition ) | ||||
| { | { | ||||
| log( "Calculating " + algorithm + " checksum for " + src ); | |||||
| getLogger().info( "Calculating " + algorithm + " checksum for " + src ); | |||||
| } | } | ||||
| fis = new FileInputStream( src ); | fis = new FileInputStream( src ); | ||||
| DigestInputStream dis = new DigestInputStream( fis, | DigestInputStream dis = new DigestInputStream( fis, | ||||
| @@ -243,7 +243,7 @@ public class Copy extends Task | |||||
| { | { | ||||
| String message = "Could not find file " | String message = "Could not find file " | ||||
| + file.getAbsolutePath() + " to copy."; | + file.getAbsolutePath() + " to copy."; | ||||
| log( message ); | |||||
| getLogger().info( message ); | |||||
| throw new TaskException( message ); | throw new TaskException( message ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -334,7 +334,7 @@ public class Copy extends Task | |||||
| { | { | ||||
| if( fileCopyMap.size() > 0 ) | if( fileCopyMap.size() > 0 ) | ||||
| { | { | ||||
| log( "Copying " + fileCopyMap.size() + | |||||
| getLogger().info( "Copying " + fileCopyMap.size() + | |||||
| " file" + ( fileCopyMap.size() == 1 ? "" : "s" ) + | " file" + ( fileCopyMap.size() == 1 ? "" : "s" ) + | ||||
| " to " + destDir.getAbsolutePath() ); | " to " + destDir.getAbsolutePath() ); | ||||
| @@ -397,7 +397,7 @@ public class Copy extends Task | |||||
| if( count > 0 ) | if( count > 0 ) | ||||
| { | { | ||||
| log( "Copied " + count + | |||||
| getLogger().info( "Copied " + count + | |||||
| " empty director" + | " empty director" + | ||||
| ( count == 1 ? "y" : "ies" ) + | ( count == 1 ? "y" : "ies" ) + | ||||
| " to " + destDir.getAbsolutePath() ); | " to " + destDir.getAbsolutePath() ); | ||||
| @@ -239,7 +239,7 @@ public class Delete extends MatchingTask | |||||
| { | { | ||||
| if( usedMatchingTask ) | if( usedMatchingTask ) | ||||
| { | { | ||||
| log( "DEPRECATED - Use of the implicit FileSet is deprecated. Use a nested fileset element instead." ); | |||||
| getLogger().info( "DEPRECATED - Use of the implicit FileSet is deprecated. Use a nested fileset element instead." ); | |||||
| } | } | ||||
| if( file == null && dir == null && filesets.size() == 0 ) | if( file == null && dir == null && filesets.size() == 0 ) | ||||
| @@ -259,11 +259,11 @@ public class Delete extends MatchingTask | |||||
| { | { | ||||
| if( file.isDirectory() ) | if( file.isDirectory() ) | ||||
| { | { | ||||
| log( "Directory " + file.getAbsolutePath() + " cannot be removed using the file attribute. Use dir instead." ); | |||||
| getLogger().info( "Directory " + file.getAbsolutePath() + " cannot be removed using the file attribute. Use dir instead." ); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| log( "Deleting: " + file.getAbsolutePath() ); | |||||
| getLogger().info( "Deleting: " + file.getAbsolutePath() ); | |||||
| if( !file.delete() ) | if( !file.delete() ) | ||||
| { | { | ||||
| @@ -294,7 +294,7 @@ public class Delete extends MatchingTask | |||||
| */ | */ | ||||
| if( verbosity == Project.MSG_VERBOSE ) | if( verbosity == Project.MSG_VERBOSE ) | ||||
| { | { | ||||
| log( "Deleting directory " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Deleting directory " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| removeDir( dir ); | removeDir( dir ); | ||||
| } | } | ||||
| @@ -408,7 +408,7 @@ public class Delete extends MatchingTask | |||||
| { | { | ||||
| if( files.length > 0 ) | if( files.length > 0 ) | ||||
| { | { | ||||
| log( "Deleting " + files.length + " files from " + d.getAbsolutePath() ); | |||||
| getLogger().info( "Deleting " + files.length + " files from " + d.getAbsolutePath() ); | |||||
| for( int j = 0; j < files.length; j++ ) | for( int j = 0; j < files.length; j++ ) | ||||
| { | { | ||||
| File f = new File( d, files[ j ] ); | File f = new File( d, files[ j ] ); | ||||
| @@ -454,7 +454,7 @@ public class Delete extends MatchingTask | |||||
| if( dirCount > 0 ) | if( dirCount > 0 ) | ||||
| { | { | ||||
| log( "Deleted " + dirCount + " director" + | |||||
| getLogger().info( "Deleted " + dirCount + " director" + | |||||
| ( dirCount == 1 ? "y" : "ies" ) + | ( dirCount == 1 ? "y" : "ies" ) + | ||||
| " from " + d.getAbsolutePath() ); | " from " + d.getAbsolutePath() ); | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ public class GUnzip extends Unpack | |||||
| { | { | ||||
| if( source.lastModified() > dest.lastModified() ) | if( source.lastModified() > dest.lastModified() ) | ||||
| { | { | ||||
| log( "Expanding " + source.getAbsolutePath() + " to " | |||||
| getLogger().info( "Expanding " + source.getAbsolutePath() + " to " | |||||
| + dest.getAbsolutePath() ); | + dest.getAbsolutePath() ); | ||||
| FileOutputStream out = null; | FileOutputStream out = null; | ||||
| @@ -160,7 +160,7 @@ public class GenerateKey | |||||
| throw new TaskException( "dname must be set" ); | throw new TaskException( "dname must be set" ); | ||||
| } | } | ||||
| log( "Generating Key for " + alias ); | |||||
| getLogger().info( "Generating Key for " + alias ); | |||||
| final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | ||||
| cmd.setExecutable( "keytool" ); | cmd.setExecutable( "keytool" ); | ||||
| @@ -151,7 +151,7 @@ public class Get extends Task | |||||
| try | try | ||||
| { | { | ||||
| log( "Getting: " + source ); | |||||
| getLogger().info( "Getting: " + source ); | |||||
| //set the timestamp to the file date. | //set the timestamp to the file date. | ||||
| long timestamp = 0; | long timestamp = 0; | ||||
| @@ -163,7 +163,7 @@ public class Get extends Task | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| Date t = new Date( timestamp ); | Date t = new Date( timestamp ); | ||||
| log( "local file date : " + t.toString() ); | |||||
| getLogger().info( "local file date : " + t.toString() ); | |||||
| } | } | ||||
| hasTimestamp = true; | hasTimestamp = true; | ||||
| @@ -209,13 +209,13 @@ public class Get extends Task | |||||
| //not modified so no file download. just return instead | //not modified so no file download. just return instead | ||||
| //and trace out something so the user doesn't think that the | //and trace out something so the user doesn't think that the | ||||
| //download happened when it didnt | //download happened when it didnt | ||||
| log( "Not modified - so not downloaded" ); | |||||
| getLogger().info( "Not modified - so not downloaded" ); | |||||
| return; | return; | ||||
| } | } | ||||
| // test for 401 result (HTTP only) | // test for 401 result (HTTP only) | ||||
| if( httpConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED ) | if( httpConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED ) | ||||
| { | { | ||||
| log( "Not authorized - check " + dest + " for details" ); | |||||
| getLogger().info( "Not authorized - check " + dest + " for details" ); | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -237,12 +237,12 @@ public class Get extends Task | |||||
| } | } | ||||
| catch( IOException ex ) | catch( IOException ex ) | ||||
| { | { | ||||
| log( "Error opening connection " + ex ); | |||||
| getLogger().info( "Error opening connection " + ex ); | |||||
| } | } | ||||
| } | } | ||||
| if( is == null ) | if( is == null ) | ||||
| { | { | ||||
| log( "Can't get " + source + " to " + dest ); | |||||
| getLogger().info( "Can't get " + source + " to " + dest ); | |||||
| if( ignoreErrors ) | if( ignoreErrors ) | ||||
| return; | return; | ||||
| throw new TaskException( "Can't get " + source + " to " + dest ); | throw new TaskException( "Can't get " + source + " to " + dest ); | ||||
| @@ -270,7 +270,7 @@ public class Get extends Task | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| Date t = new Date( remoteTimestamp ); | Date t = new Date( remoteTimestamp ); | ||||
| log( "last modified = " + t.toString() | |||||
| getLogger().info( "last modified = " + t.toString() | |||||
| + ( ( remoteTimestamp == 0 ) ? " - using current time instead" : "" ) ); | + ( ( remoteTimestamp == 0 ) ? " - using current time instead" : "" ) ); | ||||
| } | } | ||||
| if( remoteTimestamp != 0 ) | if( remoteTimestamp != 0 ) | ||||
| @@ -279,7 +279,7 @@ public class Get extends Task | |||||
| } | } | ||||
| catch( IOException ioe ) | catch( IOException ioe ) | ||||
| { | { | ||||
| log( "Error getting " + source + " to " + dest ); | |||||
| getLogger().info( "Error getting " + source + " to " + dest ); | |||||
| if( ignoreErrors ) | if( ignoreErrors ) | ||||
| return; | return; | ||||
| throw new TaskException( "Error", ioe ); | throw new TaskException( "Error", ioe ); | ||||
| @@ -774,7 +774,7 @@ public class Javac extends MatchingTask | |||||
| CompilerAdapter adapter = CompilerAdapterFactory.getCompiler( | CompilerAdapter adapter = CompilerAdapterFactory.getCompiler( | ||||
| compiler, this ); | compiler, this ); | ||||
| log( "Compiling " + compileList.length + | |||||
| getLogger().info( "Compiling " + compileList.length + | |||||
| " source file" | " source file" | ||||
| + ( compileList.length == 1 ? "" : "s" ) | + ( compileList.length == 1 ? "" : "s" ) | ||||
| + ( destDir != null ? " to " + destDir : "" ) ); | + ( destDir != null ? " to " + destDir : "" ) ); | ||||
| @@ -49,7 +49,7 @@ public class Mkdir extends Task | |||||
| "successful for an unknown reason"; | "successful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -105,7 +105,7 @@ public class Move extends Copy | |||||
| } | } | ||||
| if( fileCopyMap.size() > 0 ) | if( fileCopyMap.size() > 0 ) | ||||
| {// files to move | {// files to move | ||||
| log( "Moving " + fileCopyMap.size() + " files to " + | |||||
| getLogger().info( "Moving " + fileCopyMap.size() + " files to " + | |||||
| destDir.getAbsolutePath() ); | destDir.getAbsolutePath() ); | ||||
| Enumeration e = fileCopyMap.keys(); | Enumeration e = fileCopyMap.keys(); | ||||
| @@ -200,7 +200,7 @@ public class Move extends Copy | |||||
| if( count > 0 ) | if( count > 0 ) | ||||
| { | { | ||||
| log( "Moved " + count + " empty directories to " + destDir.getAbsolutePath() ); | |||||
| getLogger().info( "Moved " + count + " empty directories to " + destDir.getAbsolutePath() ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -41,7 +41,7 @@ public abstract class Pack extends Task | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| validate(); | validate(); | ||||
| log( "Building: " + zipFile.getAbsolutePath() ); | |||||
| getLogger().info( "Building: " + zipFile.getAbsolutePath() ); | |||||
| pack(); | pack(); | ||||
| } | } | ||||
| @@ -579,7 +579,7 @@ public class SQLExec extends Task | |||||
| } | } | ||||
| } | } | ||||
| log( goodSql + " of " + totalSql + | |||||
| getLogger().info( goodSql + " of " + totalSql + | |||||
| " SQL statements executed successfully" ); | " SQL statements executed successfully" ); | ||||
| } | } | ||||
| @@ -390,7 +390,7 @@ public class SendEmail extends Task | |||||
| throw new TaskException( "Attribute \"file\" or \"message\" is required." ); | throw new TaskException( "Attribute \"file\" or \"message\" is required." ); | ||||
| } | } | ||||
| log( "Sending email" ); | |||||
| getLogger().info( "Sending email" ); | |||||
| mailMessage.sendAndClose(); | mailMessage.sendAndClose(); | ||||
| } | } | ||||
| catch( IOException ioe ) | catch( IOException ioe ) | ||||
| @@ -326,7 +326,7 @@ public class SignJar extends Task | |||||
| cmd.createArg().setValue( alias ); | cmd.createArg().setValue( alias ); | ||||
| log( "Signing Jar : " + jarSource.getAbsolutePath() ); | |||||
| getLogger().info( "Signing Jar : " + jarSource.getAbsolutePath() ); | |||||
| cmd.setFailonerror( true ); | cmd.setFailonerror( true ); | ||||
| cmd.execute(); | cmd.execute(); | ||||
| } | } | ||||
| @@ -445,7 +445,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger | |||||
| styleSheetLastModified > outFile.lastModified() ) | styleSheetLastModified > outFile.lastModified() ) | ||||
| { | { | ||||
| ensureDirectoryFor( outFile ); | ensureDirectoryFor( outFile ); | ||||
| log( "Processing " + inFile + " to " + outFile ); | |||||
| getLogger().info( "Processing " + inFile + " to " + outFile ); | |||||
| configureLiaison( stylesheet ); | configureLiaison( stylesheet ); | ||||
| liaison.transform( inFile, outFile ); | liaison.transform( inFile, outFile ); | ||||
| @@ -276,7 +276,7 @@ public class Zip extends MatchingTask | |||||
| String action = doUpdate ? "Updating " : "Building "; | String action = doUpdate ? "Updating " : "Building "; | ||||
| log( action + archiveType + ": " + zipFile.getAbsolutePath() ); | |||||
| getLogger().info( action + archiveType + ": " + zipFile.getAbsolutePath() ); | |||||
| boolean success = false; | boolean success = false; | ||||
| try | try | ||||
| @@ -117,7 +117,7 @@ public class Cab extends MatchingTask | |||||
| if( isUpToDate( files ) ) | if( isUpToDate( files ) ) | ||||
| return; | return; | ||||
| log( "Building " + archiveType + ": " + cabFile.getAbsolutePath() ); | |||||
| getLogger().info( "Building " + archiveType + ": " + cabFile.getAbsolutePath() ); | |||||
| if( !Os.isFamily( "windows" ) ) | if( !Os.isFamily( "windows" ) ) | ||||
| { | { | ||||
| @@ -527,7 +527,7 @@ public class IContract extends MatchingTask | |||||
| { | { | ||||
| if( !controlFile.exists() ) | if( !controlFile.exists() ) | ||||
| { | { | ||||
| log( "WARNING: Control file " + controlFile.getAbsolutePath() + " doesn't exist. iContract will be run without control file." ); | |||||
| getLogger().info( "WARNING: Control file " + controlFile.getAbsolutePath() + " doesn't exist. iContract will be run without control file." ); | |||||
| } | } | ||||
| this.controlFile = controlFile; | this.controlFile = controlFile; | ||||
| } | } | ||||
| @@ -710,7 +710,7 @@ public class IContract extends MatchingTask | |||||
| // issue warning if pre,post or invariant is used together with controlfile | // issue warning if pre,post or invariant is used together with controlfile | ||||
| if( ( pre || post || invariant ) && controlFile != null ) | if( ( pre || post || invariant ) && controlFile != null ) | ||||
| { | { | ||||
| log( "WARNING: specifying pre,post or invariant will override control file settings" ); | |||||
| getLogger().info( "WARNING: specifying pre,post or invariant will override control file settings" ); | |||||
| } | } | ||||
| @@ -796,7 +796,7 @@ public class IContract extends MatchingTask | |||||
| } | } | ||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| log( "File icontrol.properties not found. That's ok. Writing a default one." ); | |||||
| getLogger().info( "File icontrol.properties not found. That's ok. Writing a default one." ); | |||||
| } | } | ||||
| iControlProps.setProperty( "sourceRoot", srcDir.getAbsolutePath() ); | iControlProps.setProperty( "sourceRoot", srcDir.getAbsolutePath() ); | ||||
| iControlProps.setProperty( "classRoot", classDir.getAbsolutePath() ); | iControlProps.setProperty( "classRoot", classDir.getAbsolutePath() ); | ||||
| @@ -807,11 +807,11 @@ public class IContract extends MatchingTask | |||||
| try | try | ||||
| {// to read existing propertiesfile | {// to read existing propertiesfile | ||||
| iControlProps.store( new FileOutputStream( "icontrol.properties" ), ICONTROL_PROPERTIES_HEADER ); | iControlProps.store( new FileOutputStream( "icontrol.properties" ), ICONTROL_PROPERTIES_HEADER ); | ||||
| log( "Updated icontrol.properties" ); | |||||
| getLogger().info( "Updated icontrol.properties" ); | |||||
| } | } | ||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| log( "Couldn't write icontrol.properties." ); | |||||
| getLogger().info( "Couldn't write icontrol.properties." ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -821,9 +821,9 @@ public class IContract extends MatchingTask | |||||
| { | { | ||||
| if( iContractMissing ) | if( iContractMissing ) | ||||
| { | { | ||||
| log( "iContract can't be found on your classpath. Your classpath is:" ); | |||||
| log( classpath.toString() ); | |||||
| log( "If you don't have the iContract jar, go get it at http://www.reliable-systems.com/tools/" ); | |||||
| getLogger().info( "iContract can't be found on your classpath. Your classpath is:" ); | |||||
| getLogger().info( classpath.toString() ); | |||||
| getLogger().info( "If you don't have the iContract jar, go get it at http://www.reliable-systems.com/tools/" ); | |||||
| } | } | ||||
| throw new TaskException( "iContract instrumentation failed. Code=" + result ); | throw new TaskException( "iContract instrumentation failed. Code=" + result ); | ||||
| } | } | ||||
| @@ -948,17 +948,17 @@ public class IContract extends MatchingTask | |||||
| if( targets == null ) | if( targets == null ) | ||||
| { | { | ||||
| targets = new File( "targets" ); | targets = new File( "targets" ); | ||||
| log( "Warning: targets file not specified. generating file: " + targets.getName() ); | |||||
| getLogger().info( "Warning: targets file not specified. generating file: " + targets.getName() ); | |||||
| writeTargets = true; | writeTargets = true; | ||||
| } | } | ||||
| else if( !targets.exists() ) | else if( !targets.exists() ) | ||||
| { | { | ||||
| log( "Specified targets file doesn't exist. generating file: " + targets.getName() ); | |||||
| getLogger().info( "Specified targets file doesn't exist. generating file: " + targets.getName() ); | |||||
| writeTargets = true; | writeTargets = true; | ||||
| } | } | ||||
| if( writeTargets ) | if( writeTargets ) | ||||
| { | { | ||||
| log( "You should consider using iControl to create a target file." ); | |||||
| getLogger().info( "You should consider using iControl to create a target file." ); | |||||
| targetOutputStream = new FileOutputStream( targets ); | targetOutputStream = new FileOutputStream( targets ); | ||||
| targetPrinter = new PrintStream( targetOutputStream ); | targetPrinter = new PrintStream( targetOutputStream ); | ||||
| } | } | ||||
| @@ -1018,7 +1018,7 @@ public class IContract extends MatchingTask | |||||
| { | { | ||||
| if( !dirty ) | if( !dirty ) | ||||
| { | { | ||||
| log( "Control file " + controlFile.getAbsolutePath() + " has been updated. Instrumenting all files..." ); | |||||
| getLogger().info( "Control file " + controlFile.getAbsolutePath() + " has been updated. Instrumenting all files..." ); | |||||
| } | } | ||||
| dirty = true; | dirty = true; | ||||
| instrumentall = true; | instrumentall = true; | ||||
| @@ -459,7 +459,7 @@ public class Javah extends Task | |||||
| public void setName( String name ) | public void setName( String name ) | ||||
| { | { | ||||
| this.name = name; | this.name = name; | ||||
| log( "ClassArgument.name=" + name ); | |||||
| getLogger().info( "ClassArgument.name=" + name ); | |||||
| } | } | ||||
| public String getName() | public String getName() | ||||
| @@ -186,7 +186,7 @@ public class ManifestFile extends Task | |||||
| if( manifestFile.exists() ) | if( manifestFile.exists() ) | ||||
| { | { | ||||
| this.log( "update existing manifest file " + manifestFile.getAbsolutePath() ); | |||||
| getLogger().info( "update existing manifest file " + manifestFile.getAbsolutePath() ); | |||||
| if( container != null ) | if( container != null ) | ||||
| { | { | ||||
| @@ -234,7 +234,7 @@ public class ManifestFile extends Task | |||||
| try | try | ||||
| { | { | ||||
| manifestFile.delete(); | manifestFile.delete(); | ||||
| log( "Replacing or creating new manifest file " + manifestFile.getAbsolutePath() ); | |||||
| getLogger().info( "Replacing or creating new manifest file " + manifestFile.getAbsolutePath() ); | |||||
| if( manifestFile.createNewFile() ) | if( manifestFile.createNewFile() ) | ||||
| { | { | ||||
| FileOutputStream fos = new FileOutputStream( manifestFile ); | FileOutputStream fos = new FileOutputStream( manifestFile ); | ||||
| @@ -163,7 +163,7 @@ public class Native2Ascii extends MatchingTask | |||||
| } | } | ||||
| String message = "Converting " + count + " file" | String message = "Converting " + count + " file" | ||||
| + ( count != 1 ? "s" : "" ) + " from "; | + ( count != 1 ? "s" : "" ) + " from "; | ||||
| log( message + srcDir + " to " + destDir ); | |||||
| getLogger().info( message + srcDir + " to " + destDir ); | |||||
| for( int i = 0; i < files.length; i++ ) | for( int i = 0; i < files.length; i++ ) | ||||
| { | { | ||||
| convert( files[ i ], m.mapFileName( files[ i ] )[ 0 ] ); | convert( files[ i ], m.mapFileName( files[ i ] )[ 0 ] ); | ||||
| @@ -500,7 +500,7 @@ public class NetRexxC extends MatchingTask | |||||
| // compile the source files | // compile the source files | ||||
| if( compileList.size() > 0 ) | if( compileList.size() > 0 ) | ||||
| { | { | ||||
| log( "Compiling " + compileList.size() + " source file" | |||||
| getLogger().info( "Compiling " + compileList.size() + " source file" | |||||
| + ( compileList.size() == 1 ? "" : "s" ) | + ( compileList.size() == 1 ? "" : "s" ) | ||||
| + " to " + destDir ); | + " to " + destDir ); | ||||
| doNetRexxCompile(); | doNetRexxCompile(); | ||||
| @@ -610,7 +610,7 @@ public class NetRexxC extends MatchingTask | |||||
| { | { | ||||
| if( filecopyList.size() > 0 ) | if( filecopyList.size() > 0 ) | ||||
| { | { | ||||
| log( "Copying " + filecopyList.size() + " file" | |||||
| getLogger().info( "Copying " + filecopyList.size() + " file" | |||||
| + ( filecopyList.size() == 1 ? "" : "s" ) | + ( filecopyList.size() == 1 ? "" : "s" ) | ||||
| + " to " + destDir.getAbsolutePath() ); | + " to " + destDir.getAbsolutePath() ); | ||||
| Enumeration enum = filecopyList.keys(); | Enumeration enum = filecopyList.keys(); | ||||
| @@ -228,7 +228,7 @@ public class PropertyFile extends Task | |||||
| { | { | ||||
| if( m_propertyfile.exists() ) | if( m_propertyfile.exists() ) | ||||
| { | { | ||||
| log( "Updating property file: " + m_propertyfile.getAbsolutePath() ); | |||||
| getLogger().info( "Updating property file: " + m_propertyfile.getAbsolutePath() ); | |||||
| FileInputStream fis = null; | FileInputStream fis = null; | ||||
| try | try | ||||
| { | { | ||||
| @@ -246,7 +246,7 @@ public class PropertyFile extends Task | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| log( "Creating new property file: " + | |||||
| getLogger().info( "Creating new property file: " + | |||||
| m_propertyfile.getAbsolutePath() ); | m_propertyfile.getAbsolutePath() ); | ||||
| FileOutputStream out = null; | FileOutputStream out = null; | ||||
| try | try | ||||
| @@ -198,7 +198,7 @@ public class Rpm extends Task | |||||
| try | try | ||||
| { | { | ||||
| exe.execute(); | exe.execute(); | ||||
| log( "Building the RPM based on the " + specFile + " file" ); | |||||
| getLogger().info( "Building the RPM based on the " + specFile + " file" ); | |||||
| } | } | ||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| @@ -270,7 +270,7 @@ public class XMLValidateTask extends Task | |||||
| fileProcessed++; | fileProcessed++; | ||||
| } | } | ||||
| } | } | ||||
| log( fileProcessed + " file(s) have been successfully validated." ); | |||||
| getLogger().info( fileProcessed + " file(s) have been successfully validated." ); | |||||
| } | } | ||||
| protected EntityResolver getEntityResolver() | protected EntityResolver getEntityResolver() | ||||
| @@ -308,7 +308,7 @@ public class Depend extends MatchingTask | |||||
| int count = deleteAllAffectedFiles(); | int count = deleteAllAffectedFiles(); | ||||
| long duration = ( System.currentTimeMillis() - start ) / 1000; | long duration = ( System.currentTimeMillis() - start ) / 1000; | ||||
| log( "Deleted " + count + " out of date files in " + duration + " seconds" ); | |||||
| getLogger().info( "Deleted " + count + " out of date files in " + duration + " seconds" ); | |||||
| } | } | ||||
| catch( Exception e ) | catch( Exception e ) | ||||
| { | { | ||||
| @@ -682,7 +682,7 @@ public class CSharp | |||||
| //get dependencies list. | //get dependencies list. | ||||
| DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | ||||
| String[] dependencies = scanner.getIncludedFiles(); | String[] dependencies = scanner.getIncludedFiles(); | ||||
| log( "compiling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| getLogger().info( "compiling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| String baseDir = scanner.getBasedir().toString(); | String baseDir = scanner.getBasedir().toString(); | ||||
| //add to the command | //add to the command | ||||
| for( int i = 0; i < dependencies.length; i++ ) | for( int i = 0; i < dependencies.length; i++ ) | ||||
| @@ -312,7 +312,7 @@ public class Ilasm | |||||
| //get dependencies list. | //get dependencies list. | ||||
| DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); | ||||
| String[] dependencies = scanner.getIncludedFiles(); | String[] dependencies = scanner.getIncludedFiles(); | ||||
| log( "assembling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| getLogger().info( "assembling " + dependencies.length + " file" + ( ( dependencies.length == 1 ) ? "" : "s" ) ); | |||||
| String baseDir = scanner.getBasedir().toString(); | String baseDir = scanner.getBasedir().toString(); | ||||
| //add to the command | //add to the command | ||||
| for( int i = 0; i < dependencies.length; i++ ) | for( int i = 0; i < dependencies.length; i++ ) | ||||
| @@ -146,7 +146,7 @@ public class NetCommand | |||||
| { | { | ||||
| if( _traceCommandLine ) | if( _traceCommandLine ) | ||||
| { | { | ||||
| _owner.log( _commandLine.toString() ); | |||||
| //_owner.getLogger().info( _commandLine.toString() ); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -132,11 +132,11 @@ public class BorlandGenerateClient extends Task | |||||
| if( mode == null ) | if( mode == null ) | ||||
| { | { | ||||
| log( "mode is null default mode is java" ); | |||||
| getLogger().info( "mode is null default mode is java" ); | |||||
| setMode( JAVA_MODE ); | setMode( JAVA_MODE ); | ||||
| }// end of if () | }// end of if () | ||||
| log( "client jar file is " + clientjarfile ); | |||||
| getLogger().info( "client jar file is " + clientjarfile ); | |||||
| if( mode.equalsIgnoreCase( FORK_MODE ) ) | if( mode.equalsIgnoreCase( FORK_MODE ) ) | ||||
| { | { | ||||
| @@ -158,7 +158,7 @@ public class BorlandGenerateClient extends Task | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| log( "mode : fork" ); | |||||
| getLogger().info( "mode : fork" ); | |||||
| org.apache.tools.ant.taskdefs.ExecTask execTask = null; | org.apache.tools.ant.taskdefs.ExecTask execTask = null; | ||||
| execTask = (ExecTask)getProject().createTask( "exec" ); | execTask = (ExecTask)getProject().createTask( "exec" ); | ||||
| @@ -203,7 +203,7 @@ public class BorlandGenerateClient extends Task | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| log( "mode : java" ); | |||||
| getLogger().info( "mode : java" ); | |||||
| org.apache.tools.ant.taskdefs.Java execTask = null; | org.apache.tools.ant.taskdefs.Java execTask = null; | ||||
| execTask = (Java)getProject().createTask( "java" ); | execTask = (Java)getProject().createTask( "java" ); | ||||
| @@ -166,7 +166,7 @@ public class JJTree extends Task | |||||
| targetName.substring( 0, targetName.indexOf( ".jjt" ) ) + ".jj" ); | targetName.substring( 0, targetName.indexOf( ".jjt" ) ) + ".jj" ); | ||||
| if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | ||||
| { | { | ||||
| log( "Target is already built - skipping (" + target + ")" ); | |||||
| getLogger().info( "Target is already built - skipping (" + target + ")" ); | |||||
| return; | return; | ||||
| } | } | ||||
| cmdl.createArgument().setValue( target.getAbsolutePath() ); | cmdl.createArgument().setValue( target.getAbsolutePath() ); | ||||
| @@ -344,7 +344,7 @@ public class JDependTask extends Task | |||||
| } | } | ||||
| if( getOutputFile() != null ) | if( getOutputFile() != null ) | ||||
| log( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| getLogger().info( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| log( "Executing: " + commandline.toString(), Project.MSG_VERBOSE ); | log( "Executing: " + commandline.toString(), Project.MSG_VERBOSE ); | ||||
| try | try | ||||
| { | { | ||||
| @@ -389,11 +389,11 @@ public class JDependTask extends Task | |||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| String msg = "JDepend Failed when creating the output file: " + e.getMessage(); | String msg = "JDepend Failed when creating the output file: " + e.getMessage(); | ||||
| log( msg ); | |||||
| getLogger().info( msg ); | |||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| jdepend.setWriter( new PrintWriter( fw ) ); | jdepend.setWriter( new PrintWriter( fw ) ); | ||||
| log( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| getLogger().info( "Output to be stored in " + getOutputFile().getPath() ); | |||||
| } | } | ||||
| PathTokenizer sourcesPath = new PathTokenizer( getSourcespath().toString() ); | PathTokenizer sourcesPath = new PathTokenizer( getSourcespath().toString() ); | ||||
| @@ -405,7 +405,7 @@ public class JDependTask extends Task | |||||
| if( !f.exists() || !f.isDirectory() ) | if( !f.exists() || !f.isDirectory() ) | ||||
| { | { | ||||
| String msg = "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail."; | String msg = "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail."; | ||||
| log( msg ); | |||||
| getLogger().info( msg ); | |||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| try | try | ||||
| @@ -415,7 +415,7 @@ public class JDependTask extends Task | |||||
| catch( IOException e ) | catch( IOException e ) | ||||
| { | { | ||||
| String msg = "JDepend Failed when adding a source directory: " + e.getMessage(); | String msg = "JDepend Failed when adding a source directory: " + e.getMessage(); | ||||
| log( msg ); | |||||
| getLogger().info( msg ); | |||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -157,7 +157,7 @@ public class JlinkTask extends MatchingTask | |||||
| { | { | ||||
| throw new TaskException( "addfiles or mergefiles required! Please set." ); | throw new TaskException( "addfiles or mergefiles required! Please set." ); | ||||
| } | } | ||||
| log( "linking: " + outfile.getPath() ); | |||||
| getLogger().info( "linking: " + outfile.getPath() ); | |||||
| log( "compression: " + compress, Project.MSG_VERBOSE ); | log( "compression: " + compress, Project.MSG_VERBOSE ); | ||||
| jlink linker = new jlink(); | jlink linker = new jlink(); | ||||
| linker.setOutfile( outfile.getPath() ); | linker.setOutfile( outfile.getPath() ); | ||||
| @@ -388,7 +388,7 @@ public class JspC extends MatchingTask | |||||
| CompilerAdapter adapter = | CompilerAdapter adapter = | ||||
| CompilerAdapterFactory.getCompiler( compiler, this ); | CompilerAdapterFactory.getCompiler( compiler, this ); | ||||
| log( "Compiling " + compileList.size() + | |||||
| getLogger().info( "Compiling " + compileList.size() + | |||||
| " source file" | " source file" | ||||
| + ( compileList.size() == 1 ? "" : "s" ) | + ( compileList.size() == 1 ? "" : "s" ) | ||||
| + ( destDir != null ? " to " + destDir : "" ) ); | + ( destDir != null ? " to " + destDir : "" ) ); | ||||
| @@ -197,7 +197,7 @@ public class WLJspc extends MatchingTask | |||||
| args[ j++ ] = compileClasspath.toString(); | args[ j++ ] = compileClasspath.toString(); | ||||
| this.scanDir( files ); | this.scanDir( files ); | ||||
| log( "Compiling " + filesToDo.size() + " JSP files" ); | |||||
| getLogger().info( "Compiling " + filesToDo.size() + " JSP files" ); | |||||
| for( int i = 0; i < filesToDo.size(); i++ ) | for( int i = 0; i < filesToDo.size(); i++ ) | ||||
| { | { | ||||
| @@ -134,7 +134,7 @@ public class AggregateTransformer | |||||
| throw new TaskException( "Errors while applying transformations", e ); | throw new TaskException( "Errors while applying transformations", e ); | ||||
| } | } | ||||
| final long dt = System.currentTimeMillis() - t0; | final long dt = System.currentTimeMillis() - t0; | ||||
| task.log( "Transform time: " + dt + "ms" ); | |||||
| //task.getLogger().info( "Transform time: " + dt + "ms" ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -62,7 +62,7 @@ abstract class XalanExecutor | |||||
| } | } | ||||
| } | } | ||||
| String version = getXalanVersion( procVersion ); | String version = getXalanVersion( procVersion ); | ||||
| caller.task.log( "Using Xalan version: " + version ); | |||||
| //caller.task.getLogger().info( "Using Xalan version: " + version ); | |||||
| executor.setCaller( caller ); | executor.setCaller( caller ); | ||||
| return executor; | return executor; | ||||
| } | } | ||||
| @@ -301,7 +301,7 @@ public class MParse extends Task | |||||
| File javaFile = new File( pathname ); | File javaFile = new File( pathname ); | ||||
| if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | if( javaFile.exists() && target.lastModified() < javaFile.lastModified() ) | ||||
| { | { | ||||
| log( "Target is already build - skipping (" + target + ")" ); | |||||
| getLogger().info( "Target is already build - skipping (" + target + ")" ); | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -372,7 +372,7 @@ public class MParse extends Task | |||||
| final File sunjj = new File( target.getParent(), name ); | final File sunjj = new File( target.getParent(), name ); | ||||
| if( sunjj.exists() ) | if( sunjj.exists() ) | ||||
| { | { | ||||
| log( "Removing stale file: " + sunjj.getName() ); | |||||
| getLogger().info( "Removing stale file: " + sunjj.getName() ); | |||||
| sunjj.delete(); | sunjj.delete(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -352,7 +352,7 @@ public class FTP | |||||
| ftp.getReplyString() ); | ftp.getReplyString() ); | ||||
| } | } | ||||
| } | } | ||||
| log( ACTION_STRS[ action ] + " files" ); | |||||
| getLogger().info( ACTION_STRS[ action ] + " files" ); | |||||
| transferFiles( ftp ); | transferFiles( ftp ); | ||||
| } | } | ||||
| @@ -405,7 +405,7 @@ public class FTP | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "transferring " + filename + " to " + file.getAbsolutePath() ); | |||||
| getLogger().info( "transferring " + filename + " to " + file.getAbsolutePath() ); | |||||
| } | } | ||||
| File pdir = new File( file.getParent() );// stay 1.1 compatible | File pdir = new File( file.getParent() );// stay 1.1 compatible | ||||
| @@ -595,7 +595,7 @@ public class FTP | |||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "deleting " + filename ); | |||||
| getLogger().info( "deleting " + filename ); | |||||
| } | } | ||||
| if( !ftp.deleteFile( resolveFile( filename ) ) ) | if( !ftp.deleteFile( resolveFile( filename ) ) ) | ||||
| @@ -636,7 +636,7 @@ public class FTP | |||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "listing " + filename ); | |||||
| getLogger().info( "listing " + filename ); | |||||
| } | } | ||||
| FTPFile ftpfile = ftp.listFiles( resolveFile( filename ) )[ 0 ]; | FTPFile ftpfile = ftp.listFiles( resolveFile( filename ) )[ 0 ]; | ||||
| @@ -659,7 +659,7 @@ public class FTP | |||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "creating directory: " + dir ); | |||||
| getLogger().info( "creating directory: " + dir ); | |||||
| } | } | ||||
| if( !ftp.makeDirectory( dir ) ) | if( !ftp.makeDirectory( dir ) ) | ||||
| @@ -677,14 +677,14 @@ public class FTP | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "directory already exists" ); | |||||
| getLogger().info( "directory already exists" ); | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "directory created OK" ); | |||||
| getLogger().info( "directory created OK" ); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -733,7 +733,7 @@ public class FTP | |||||
| if( verbose ) | if( verbose ) | ||||
| { | { | ||||
| log( "transferring " + file.getAbsolutePath() ); | |||||
| getLogger().info( "transferring " + file.getAbsolutePath() ); | |||||
| } | } | ||||
| instream = new BufferedInputStream( new FileInputStream( file ) ); | instream = new BufferedInputStream( new FileInputStream( file ) ); | ||||
| @@ -907,10 +907,10 @@ public class FTP | |||||
| } | } | ||||
| } | } | ||||
| log( transferred + " files " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| getLogger().info( transferred + " files " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| if( skipped != 0 ) | if( skipped != 0 ) | ||||
| { | { | ||||
| log( skipped + " files were not successfully " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| getLogger().info( skipped + " files were not successfully " + COMPLETED_ACTION_STRS[ action ] ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -334,7 +334,7 @@ public class MimeMail extends Task | |||||
| }// for i | }// for i | ||||
| msg.setContent( attachments ); | msg.setContent( attachments ); | ||||
| log( "sending email " ); | |||||
| getLogger().info( "sending email " ); | |||||
| Transport.send( msg ); | Transport.send( msg ); | ||||
| } | } | ||||
| @@ -621,7 +621,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| // send the message to the project log. | // send the message to the project log. | ||||
| // Tell how many files were checked out. | // Tell how many files were checked out. | ||||
| log( checkedOut + " files checked out." ); | |||||
| getLogger().info( checkedOut + " files checked out." ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -856,7 +856,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| strFolder = strFolder.substring( i + 1 ); | strFolder = strFolder.substring( i + 1 ); | ||||
| } | } | ||||
| log( " Folder: \"" + strFolder + "\"" ); | |||||
| getLogger().info( " Folder: \"" + strFolder + "\"" ); | |||||
| prevFolder = f; | prevFolder = f; | ||||
| // If we displayed the project, view, item type, or folder, | // If we displayed the project, view, item type, or folder, | ||||
| @@ -867,7 +867,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| header.append( ",\t" ).append( p2.getDisplayName() ); | header.append( ",\t" ).append( p2.getDisplayName() ); | ||||
| } | } | ||||
| log( header.toString() ); | |||||
| getLogger().info( header.toString() ); | |||||
| } | } | ||||
| // Finally, show the Item properties ... | // Finally, show the Item properties ... | ||||
| @@ -896,7 +896,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| itemLine.append( ",\tNot locked" ); | itemLine.append( ",\tNot locked" ); | ||||
| } | } | ||||
| log( itemLine.toString() ); | |||||
| getLogger().info( itemLine.toString() ); | |||||
| } | } | ||||
| // END VERBOSE ONLY | // END VERBOSE ONLY | ||||
| @@ -936,7 +936,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| if( getVerbose() ) | if( getVerbose() ) | ||||
| { | { | ||||
| log( "Found " + getProjectName() + delim + getViewName() + delim ); | |||||
| getLogger().info( "Found " + getProjectName() + delim + getViewName() + delim ); | |||||
| } | } | ||||
| runType( s, p, v, s.typeForName( (String)s.getTypeNames().FILE ) ); | runType( s, p, v, s.typeForName( (String)s.getTypeNames().FILE ) ); | ||||
| break; | break; | ||||
| @@ -960,7 +960,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| { | { | ||||
| if( getVerbose() ) | if( getVerbose() ) | ||||
| { | { | ||||
| log( "Found " + getProjectName() + delim ); | |||||
| getLogger().info( "Found " + getProjectName() + delim ); | |||||
| } | } | ||||
| runProject( s, p ); | runProject( s, p ); | ||||
| break; | break; | ||||
| @@ -997,7 +997,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task | |||||
| if( getVerbose() && getFolderName() != null ) | if( getVerbose() && getFolderName() != null ) | ||||
| { | { | ||||
| log( "Found " + getProjectName() + delim + getViewName() + | |||||
| getLogger().info( "Found " + getProjectName() + delim + getViewName() + | |||||
| delim + getFolderName() + delim + "\n" ); | delim + getFolderName() + delim + "\n" ); | ||||
| } | } | ||||
| @@ -333,7 +333,7 @@ public class CovReport extends Task | |||||
| } | } | ||||
| if( reference != null && !"xml".equals( format ) ) | if( reference != null && !"xml".equals( format ) ) | ||||
| { | { | ||||
| log( "Ignored reference. It cannot be used in non XML report." ); | |||||
| getLogger().info( "Ignored reference. It cannot be used in non XML report." ); | |||||
| reference = null;// nullify it so that there is no ambiguity | reference = null;// nullify it so that there is no ambiguity | ||||
| } | } | ||||
| @@ -154,7 +154,7 @@ public class MSVSSCHECKIN extends MSVSS | |||||
| "succesful for an unknown reason"; | "succesful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | ||||
| @@ -181,7 +181,7 @@ public class MSVSSCHECKOUT extends MSVSS | |||||
| "succesful for an unknown reason"; | "succesful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | ||||
| @@ -389,7 +389,7 @@ public class MSVSSGET extends MSVSS | |||||
| "successful for an unknown reason"; | "successful for an unknown reason"; | ||||
| throw new TaskException( msg ); | throw new TaskException( msg ); | ||||
| } | } | ||||
| log( "Created dir: " + dir.getAbsolutePath() ); | |||||
| getLogger().info( "Created dir: " + dir.getAbsolutePath() ); | |||||
| } | } | ||||
| cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | cmd.createArgument().setValue( FLAG_OVERRIDE_WORKING_DIR + m_LocalPath ); | ||||