adammurdoch 02/03/21 23:18:09
Modified: proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs
Get.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javacc
JJTree.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc
Javadoc.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jdepend
JDependTask.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp
JspC.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata
MParse.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/net
FTP.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/perforce
P4Add.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic
DefaultRmicAdapter.java Rmic.java
proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text
ReplaceRegExp.java
proposal/myrmidon/src/java/org/apache/antlib/archive
Pack.java Unpack.java
proposal/myrmidon/src/java/org/apache/antlib/build
Checksum.java
proposal/myrmidon/src/java/org/apache/antlib/core Log.java
PropertyDump.java
proposal/myrmidon/src/java/org/apache/antlib/file
CopyTask.java ListPathTask.java
proposal/myrmidon/src/java/org/apache/antlib/selftest
PrimitiveTypesTest.java
proposal/myrmidon/src/java/org/apache/antlib/vfile
CopyFilesTask.java
proposal/myrmidon/src/java/org/apache/antlib/xml
XSLTProcess.java
proposal/myrmidon/src/java/org/apache/myrmidon/api
TaskContext.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
DefaultTaskContext.java
proposal/myrmidon/src/java/org/apache/myrmidon/framework
Execute.java LogLevel.java
LoggingExecOutputHandler.java
proposal/myrmidon/src/java/org/apache/myrmidon/framework/java
ExecuteJava.java
proposal/myrmidon/src/ant1compat/org/apache/tools/ant
Ant1CompatProject.java
Log:
Added TaskContext.verbose(), and fixed up the usages of info() and warn().
Revision Changes Path
1.2 +4 -4
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Get.java
Index: Get.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Get.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Get.java 17 Mar 2002 09:42:21 -0000 1.1
+++ Get.java 22 Mar 2002 07:18:07 -0000 1.2
@@ -160,7 +160,7 @@
if( verbose )
{
Date t = new Date( timestamp );
- getContext().info( "local file date : " + t.toString() );
+ getContext().verbose( "local file date : " +
t.toString() );
}
hasTimestamp = true;
@@ -206,7 +206,7 @@
//not modified so no file download. just return instead
//and trace out something so the user doesn't think that
the
//download happened when it didnt
- getContext().info( "Not modified - so not downloaded" );
+ getContext().verbose( "Not modified - so not downloaded"
);
return;
}
// test for 401 result (HTTP only)
@@ -273,8 +273,8 @@
if( verbose )
{
Date t = new Date( remoteTimestamp );
- getContext().info( "last modified = " + t.toString()
- + ( ( remoteTimestamp == 0 ) ? " -
using current time instead" : "" ) );
+ getContext().verbose( "last modified = " + t.toString()
+ + ( ( remoteTimestamp == 0 ) ? " -
using current time instead" : "" ) );
}
if( remoteTimestamp != 0 )
1.6 +1 -1
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javacc/JJTree.java
Index: JJTree.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javacc/JJTree.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JJTree.java 21 Mar 2002 08:03:55 -0000 1.5
+++ JJTree.java 22 Mar 2002 07:18:07 -0000 1.6
@@ -156,7 +156,7 @@
targetName.substring( 0,
targetName.indexOf( ".jjt" ) ) + ".jj" );
if( javaFile.exists() && target.lastModified() <
javaFile.lastModified() )
{
- getContext().info( "Target is already built - skipping (" +
target + ")" );
+ getContext().verbose( "Target is already built - skipping (" +
target + ")" );
return;
}
exe.getArguments().addArgument( target );
1.8 +1 -3
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Javadoc.java 22 Mar 2002 04:12:36 -0000 1.7
+++ Javadoc.java 22 Mar 2002 07:18:07 -0000 1.8
@@ -810,8 +810,6 @@
}
getContext().debug( "Javadoc args: " + cmd );
- getContext().info( "Javadoc execution" );
-
final Execute exe = new Execute();
exe.setExecOutputHandler( this );
@@ -1025,7 +1023,7 @@
{
if( line.startsWith( "Generating " ) || line.startsWith( "Building "
) )
{
- getContext().debug( line );
+ getContext().verbose( line );
}
else
{
1.9 +0 -3
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jdepend/JDependTask.java
Index: JDependTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jdepend/JDependTask.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- JDependTask.java 22 Mar 2002 04:12:36 -0000 1.8
+++ JDependTask.java 22 Mar 2002 07:18:07 -0000 1.9
@@ -229,7 +229,6 @@
catch( IOException e )
{
String msg = "JDepend Failed when creating the output file:
" + e.getMessage();
- getContext().info( msg );
throw new TaskException( msg );
}
jdepend.setWriter( new PrintWriter( fw ) );
@@ -245,7 +244,6 @@
if( !f.exists() || !f.isDirectory() )
{
String msg = "\"" + f.getPath() + "\" does not represent a
valid directory. JDepend would fail.";
- getContext().info( msg );
throw new TaskException( msg );
}
try
@@ -255,7 +253,6 @@
catch( IOException e )
{
String msg = "JDepend Failed when adding a source directory:
" + e.getMessage();
- getContext().info( msg );
throw new TaskException( msg );
}
}
1.6 +3 -3
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/JspC.java
Index: JspC.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/JspC.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JspC.java 22 Mar 2002 04:12:36 -0000 1.5
+++ JspC.java 22 Mar 2002 07:18:07 -0000 1.6
@@ -56,7 +56,7 @@
* </a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
* @author <a href="mailto:[EMAIL PROTECTED]">J D Glanville</a>
- * @version $Revision: 1.5 $ $Date: 2002/03/22 04:12:36 $
+ * @version $Revision: 1.6 $ $Date: 2002/03/22 07:18:07 $
*/
public class JspC extends MatchingTask
{
@@ -408,11 +408,11 @@
{
if( filecount == 0 )
{
- getContext().info( "there were no files to compile" );
+ getContext().verbose( "there were no files to compile" );
}
else
{
- getContext().debug( "all files are up to date" );
+ getContext().verbose( "all files are up to date" );
}
}
}
1.9 +2 -2
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MParse.java
Index: MParse.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/metamata/MParse.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MParse.java 22 Mar 2002 04:12:37 -0000 1.8
+++ MParse.java 22 Mar 2002 07:18:08 -0000 1.9
@@ -266,7 +266,7 @@
File javaFile = new File( pathname );
if( javaFile.exists() && m_target.lastModified() <
javaFile.lastModified() )
{
- getContext().info( "Target is already build - skipping (" +
m_target + ")" );
+ getContext().verbose( "Target is already build - skipping (" +
m_target + ")" );
return;
}
@@ -325,7 +325,7 @@
final File sunjj = new File( m_target.getParent(), name );
if( sunjj.exists() )
{
- getContext().info( "Removing stale file: " + sunjj.getName()
);
+ getContext().debug( "Removing stale file: " +
sunjj.getName() );
sunjj.delete();
}
}
1.2 +7 -7
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/net/FTP.java
Index: FTP.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/net/FTP.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FTP.java 17 Mar 2002 09:56:55 -0000 1.1
+++ FTP.java 22 Mar 2002 07:18:08 -0000 1.2
@@ -411,7 +411,7 @@
if( m_verbose )
{
- getContext().info( "transferring " + filename + " to " +
file.getAbsolutePath() );
+ getContext().verbose( "transferring " + filename + " to " +
file.getAbsolutePath() );
}
final File parent = file.getParentFile();
@@ -581,7 +581,7 @@
{
if( m_verbose )
{
- getContext().info( "deleting " + filename );
+ getContext().verbose( "deleting " + filename );
}
if( !ftp.deleteFile( remoteResolveFile( filename ) ) )
@@ -616,7 +616,7 @@
{
if( m_verbose )
{
- getContext().info( "listing " + filename );
+ getContext().verbose( "listing " + filename );
}
FTPFile ftpfile = ftp.listFiles( remoteResolveFile( filename ) )[ 0
];
@@ -639,7 +639,7 @@
{
if( m_verbose )
{
- getContext().info( "creating directory: " + dir );
+ getContext().verbose( "creating directory: " + dir );
}
if( !ftp.makeDirectory( dir ) )
@@ -657,14 +657,14 @@
if( m_verbose )
{
- getContext().info( "directory already exists" );
+ getContext().verbose( "directory already exists" );
}
}
else
{
if( m_verbose )
{
- getContext().info( "directory created OK" );
+ getContext().verbose( "directory created OK" );
}
}
}
@@ -715,7 +715,7 @@
if( m_verbose )
{
- getContext().info( "transferring " + file.getAbsolutePath()
);
+ getContext().verbose( "transferring " +
file.getAbsolutePath() );
}
instream = new BufferedInputStream( new FileInputStream( file )
);
1.2 +1 -1
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/perforce/P4Add.java
Index: P4Add.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/perforce/P4Add.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- P4Add.java 17 Mar 2002 09:56:55 -0000 1.1
+++ P4Add.java 22 Mar 2002 07:18:08 -0000 1.2
@@ -165,7 +165,7 @@
if( getContext().isInfoEnabled() )
{
final String message = "Execing add " + m_p4CmdOpts + " " +
addCmd + list;
- getContext().info( message );
+ getContext().verbose( message );
}
final String command = "-s add " + m_p4CmdOpts + " " + addCmd + list;
1.6 +4 -4
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java
Index: DefaultRmicAdapter.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DefaultRmicAdapter.java 22 Mar 2002 04:12:37 -0000 1.5
+++ DefaultRmicAdapter.java 22 Mar 2002 07:18:08 -0000 1.6
@@ -150,11 +150,11 @@
if( attributes.getIiop() )
{
- getTaskContext().info( "IIOP has been turned on." );
+ getTaskContext().verbose( "IIOP has been turned on." );
cmd.addArgument( "-iiop" );
if( attributes.getIiopopts() != null )
{
- getTaskContext().info( "IIOP Options: " +
attributes.getIiopopts() );
+ getTaskContext().verbose( "IIOP Options: " +
attributes.getIiopopts() );
cmd.addArgument( attributes.getIiopopts() );
}
}
@@ -162,11 +162,11 @@
if( attributes.getIdl() )
{
cmd.addArgument( "-idl" );
- getTaskContext().info( "IDL has been turned on." );
+ getTaskContext().verbose( "IDL has been turned on." );
if( attributes.getIdlopts() != null )
{
cmd.addArgument( attributes.getIdlopts() );
- getTaskContext().info( "IDL Options: " +
attributes.getIdlopts() );
+ getTaskContext().verbose( "IDL Options: " +
attributes.getIdlopts() );
}
}
1.5 +1 -1
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/Rmic.java
Index: Rmic.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/Rmic.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Rmic.java 22 Mar 2002 04:12:37 -0000 1.4
+++ Rmic.java 22 Mar 2002 07:18:08 -0000 1.5
@@ -475,7 +475,7 @@
if( verify )
{
- getContext().info( "Verify has been turned on." );
+ getContext().verbose( "Verify has been turned on." );
}
String compiler = getContext().getProperty( "build.rmic"
).toString();
1.2 +1 -1
jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text/ReplaceRegExp.java
Index: ReplaceRegExp.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text/ReplaceRegExp.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ReplaceRegExp.java 17 Mar 2002 09:42:24 -0000 1.1
+++ ReplaceRegExp.java 22 Mar 2002 07:18:08 -0000 1.2
@@ -310,7 +310,7 @@
( byline ? " by line" : "" ) +
( flags.length() > 0 ? " with flags: '" + flags + "'" : "" )
+
".";
- getContext().warn( message );
+ getContext().info( message );
if( byline )
{
1.7 +1 -1
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/archive/Pack.java
Index: Pack.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/archive/Pack.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Pack.java 18 Mar 2002 09:15:08 -0000 1.6
+++ Pack.java 22 Mar 2002 07:18:08 -0000 1.7
@@ -43,7 +43,7 @@
{
validate();
final String message = "Building: " + m_zipFile.getAbsolutePath();
- getContext().info( message );
+ getContext().verbose( message );
pack();
}
1.5 +1 -1
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/archive/Unpack.java
Index: Unpack.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/archive/Unpack.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Unpack.java 18 Mar 2002 09:15:08 -0000 1.4
+++ Unpack.java 22 Mar 2002 07:18:08 -0000 1.5
@@ -52,7 +52,7 @@
{
final String message = "Expanding " + src.getAbsolutePath() +
" to " + dest.getAbsolutePath();
- getContext().info( message );
+ getContext().verbose( message );
extract();
}
1.8 +2 -3
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/build/Checksum.java
Index: Checksum.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/build/Checksum.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Checksum.java 18 Mar 2002 09:15:08 -0000 1.7
+++ Checksum.java 22 Mar 2002 07:18:08 -0000 1.8
@@ -32,7 +32,7 @@
*
* @ant:task name="checksum"
* @author <a href="mailto:[EMAIL PROTECTED]">Magesh Umasankar</a>
- * @version $Revision: 1.7 $ $Date: 2002/03/18 09:15:08 $
+ * @version $Revision: 1.8 $ $Date: 2002/03/22 07:18:08 $
*/
public class Checksum
extends AbstractMatchingTask
@@ -207,7 +207,6 @@
{
final String message = "Could not find file " +
file.getAbsolutePath() +
" to generate checksum for.";
- getContext().info( message );
throw new TaskException( message );
}
}
@@ -225,7 +224,7 @@
{
final File src = (File)includes.nextElement();
final String message = "Calculating " + m_algorithm + " checksum
for " + src;
- getContext().info( message );
+ getContext().verbose( message );
checksumMatches = z( src, checksumMatches );
}
1.13 +1 -1
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/Log.java
Index: Log.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/Log.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Log.java 18 Mar 2002 09:15:08 -0000 1.12
+++ Log.java 22 Mar 2002 07:18:08 -0000 1.13
@@ -28,7 +28,7 @@
/**
* The level at which to print out messages.
*/
- private LogLevel m_level = LogLevel.WARN;
+ private LogLevel m_level = LogLevel.INFO;
/**
* Set the level at which the message will be logged.
1.2 +2 -2
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/PropertyDump.java
Index: PropertyDump.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/PropertyDump.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PropertyDump.java 21 Mar 2002 09:31:12 -0000 1.1
+++ PropertyDump.java 22 Mar 2002 07:18:08 -0000 1.2
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jim Cook</a>
- * @version $Revision: 1.1 $ $Date: 2002/03/21 09:31:12 $
+ * @version $Revision: 1.2 $ $Date: 2002/03/22 07:18:08 $
* @ant:task name="property-dump"
*/
public class PropertyDump
@@ -35,7 +35,7 @@
{
final String key = (String)iterator.next();
final Object value = properties.get( key );
- getContext().warn( key + "=" + value );
+ getContext().info( key + "=" + value );
}
}
}
1.8 +3 -3
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/CopyTask.java
Index: CopyTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/CopyTask.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CopyTask.java 18 Mar 2002 09:15:09 -0000 1.7
+++ CopyTask.java 22 Mar 2002 07:18:08 -0000 1.8
@@ -34,7 +34,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
* @author <A href="[EMAIL PROTECTED]">Michael McCallum</A>
* @author <a href="mailto:[EMAIL PROTECTED]">Magesh Umasankar</a>
- * @version $Revision: 1.7 $ $Date: 2002/03/18 09:15:09 $
+ * @version $Revision: 1.8 $ $Date: 2002/03/22 07:18:08 $
*/
public class CopyTask
extends AbstractTask
@@ -328,7 +328,7 @@
{
final String message =
REZ.getString( "copy.selfcopy-ignored.notice", source );
- getContext().info( message );
+ getContext().verbose( message );
continue;
}
@@ -336,7 +336,7 @@
{
final String message =
REZ.getString( "copy.filecopy.notice", source,
destination );
- getContext().info( message );
+ getContext().verbose( message );
doOperation( source, destination );
}
1.2 +2 -2
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/ListPathTask.java
Index: ListPathTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/ListPathTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ListPathTask.java 22 Mar 2002 04:12:35 -0000 1.1
+++ ListPathTask.java 22 Mar 2002 07:18:08 -0000 1.2
@@ -16,7 +16,7 @@
* A diagnostic task that lists the contents of a path.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a>
- * @version $Revision: 1.1 $ $Date: 2002/03/22 04:12:35 $
+ * @version $Revision: 1.2 $ $Date: 2002/03/22 07:18:08 $
*
* @ant:task name="list-path"
*/
@@ -43,7 +43,7 @@
for( int i = 0; i < files.length; i++ )
{
final String file = files[ i ];
- getContext().warn( file );
+ getContext().info( file );
}
}
}
1.6 +13 -13
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/selftest/PrimitiveTypesTest.java
Index: PrimitiveTypesTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/selftest/PrimitiveTypesTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PrimitiveTypesTest.java 18 Mar 2002 09:15:09 -0000 1.5
+++ PrimitiveTypesTest.java 22 Mar 2002 07:18:08 -0000 1.6
@@ -21,67 +21,67 @@
{
public void setInteger( final Integer value )
{
- getContext().warn( "setInteger( " + value + " );" );
+ getContext().info( "setInteger( " + value + " );" );
}
public void setInteger2( final int value )
{
- getContext().warn( "setInteger2( " + value + " );" );
+ getContext().info( "setInteger2( " + value + " );" );
}
public void setShort( final Short value )
{
- getContext().warn( "setShort( " + value + " );" );
+ getContext().info( "setShort( " + value + " );" );
}
public void setShort2( final short value )
{
- getContext().warn( "setShort2( " + value + " );" );
+ getContext().info( "setShort2( " + value + " );" );
}
public void setByte( final Byte value )
{
- getContext().warn( "setByte( " + value + " );" );
+ getContext().info( "setByte( " + value + " );" );
}
public void setByte2( final byte value )
{
- getContext().warn( "setByte2( " + value + " );" );
+ getContext().info( "setByte2( " + value + " );" );
}
public void setLong( final Long value )
{
- getContext().warn( "setLong( " + value + " );" );
+ getContext().info( "setLong( " + value + " );" );
}
public void setLong2( final long value )
{
- getContext().warn( "setLong2( " + value + " );" );
+ getContext().info( "setLong2( " + value + " );" );
}
public void setFloat( final Float value )
{
- getContext().warn( "setFloat( " + value + " );" );
+ getContext().info( "setFloat( " + value + " );" );
}
public void setFloat2( final float value )
{
- getContext().warn( "setFloat2( " + value + " );" );
+ getContext().info( "setFloat2( " + value + " );" );
}
public void setDouble( final Double value )
{
- getContext().warn( "setDouble( " + value + " );" );
+ getContext().info( "setDouble( " + value + " );" );
}
public void setDouble2( final double value )
{
- getContext().warn( "setDouble2( " + value + " );" );
+ getContext().info( "setDouble2( " + value + " );" );
}
public void setString( final String value )
{
- getContext().warn( "setString( " + value + " );" );
+ getContext().info( "setString( " + value + " );" );
}
public void execute()
1.7 +2 -2
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/vfile/CopyFilesTask.java
Index: CopyFilesTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/vfile/CopyFilesTask.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CopyFilesTask.java 18 Mar 2002 09:15:09 -0000 1.6
+++ CopyFilesTask.java 22 Mar 2002 07:18:08 -0000 1.7
@@ -113,7 +113,7 @@
m_destFile = m_destDir.resolveFile(
m_srcFile.getName().getBaseName() );
}
- getContext().info( "copy " + m_srcFile + " to " + m_destFile
);
+ getContext().verbose( "copy " + m_srcFile + " to " +
m_destFile );
m_destFile.copy( m_srcFile );
}
@@ -141,7 +141,7 @@
final FileObject destFile = m_destDir.resolveFile( path,
NameScope.DESCENDENT );
// Copy the file across
- getContext().info( "copy " + srcFile + " to " + destFile
);
+ getContext().verbose( "copy " + srcFile + " to " +
destFile );
destFile.copy( srcFile );
}
}
1.23 +0 -1
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java
Index: XSLTProcess.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- XSLTProcess.java 22 Mar 2002 04:12:36 -0000 1.22
+++ XSLTProcess.java 22 Mar 2002 07:18:08 -0000 1.23
@@ -251,7 +251,6 @@
catch( final Exception e )
{
final String message = "Failed to read stylesheet " +
m_stylesheet;
- getContext().info( message );
throw new TaskException( e.getMessage(), e );
}
}
1.26 +23 -1
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java
Index: TaskContext.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- TaskContext.java 12 Mar 2002 08:41:37 -0000 1.25
+++ TaskContext.java 22 Mar 2002 07:18:08 -0000 1.26
@@ -17,7 +17,7 @@
* Unlike other APIs the Logging is provided through another interface
(LogEnabled).
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.25 $ $Date: 2002/03/12 08:41:37 $
+ * @version $Revision: 1.26 $ $Date: 2002/03/22 07:18:08 $
*/
public interface TaskContext
{
@@ -121,6 +121,28 @@
* @return true if "debug" messages will be logged
*/
boolean isDebugEnabled();
+
+ /**
+ * Log a verbose message.
+ *
+ * @param message the message
+ */
+ void verbose( String message );
+
+ /**
+ * Log a verbose message.
+ *
+ * @param message the message
+ * @param throwable the throwable
+ */
+ void verbose( String message, Throwable throwable );
+
+ /**
+ * Determine if messages of priority "verbose" will be logged.
+ *
+ * @return true if "verbose" messages will be logged
+ */
+ boolean isVerboseEnabled();
/**
* Log a info message.
1.30 +41 -10
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
Index: DefaultTaskContext.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- DefaultTaskContext.java 20 Mar 2002 22:30:55 -0000 1.29
+++ DefaultTaskContext.java 22 Mar 2002 07:18:08 -0000 1.30
@@ -26,7 +26,7 @@
* Default implementation of TaskContext.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.29 $ $Date: 2002/03/20 22:30:55 $
+ * @version $Revision: 1.30 $ $Date: 2002/03/22 07:18:08 $
*/
public class DefaultTaskContext
implements TaskContext
@@ -243,13 +243,44 @@
}
/**
+ * Log a verbose message.
+ *
+ * @param message the message
+ */
+ public void verbose( String message )
+ {
+ m_logger.info( message );
+ }
+
+ /**
+ * Log a verbose message.
+ *
+ * @param message the message
+ * @param throwable the throwable
+ */
+ public void verbose( String message, Throwable throwable )
+ {
+ m_logger.info( message, throwable );
+ }
+
+ /**
+ * Determine if messages of priority "verbose" will be logged.
+ *
+ * @return true if "verbose" messages will be logged
+ */
+ public boolean isVerboseEnabled()
+ {
+ return m_logger.isInfoEnabled();
+ }
+
+ /**
* Log a info message.
*
* @param message the message
*/
public void info( final String message )
{
- m_logger.info( message );
+ m_logger.warn( message );
}
/**
@@ -260,7 +291,7 @@
*/
public void info( final String message, final Throwable throwable )
{
- m_logger.info( message, throwable );
+ m_logger.warn( message, throwable );
}
/**
@@ -270,7 +301,7 @@
*/
public boolean isInfoEnabled()
{
- return m_logger.isInfoEnabled();
+ return m_logger.isWarnEnabled();
}
/**
@@ -280,7 +311,7 @@
*/
public void warn( final String message )
{
- m_logger.warn( message );
+ m_logger.error( message );
}
/**
@@ -291,7 +322,7 @@
*/
public void warn( final String message, final Throwable throwable )
{
- m_logger.warn( message, throwable );
+ m_logger.error( message, throwable );
}
/**
@@ -301,7 +332,7 @@
*/
public boolean isWarnEnabled()
{
- return m_logger.isWarnEnabled();
+ return m_logger.isErrorEnabled();
}
/**
@@ -311,7 +342,7 @@
*/
public void error( final String message )
{
- m_logger.error( message );
+ m_logger.fatalError( message );
}
/**
@@ -322,7 +353,7 @@
*/
public void error( final String message, final Throwable throwable )
{
- m_logger.error( message, throwable );
+ m_logger.fatalError( message, throwable );
}
/**
@@ -332,7 +363,7 @@
*/
public boolean isErrorEnabled()
{
- return m_logger.isErrorEnabled();
+ return m_logger.isFatalErrorEnabled();
}
/**
1.10 +3 -3
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Execute.java
Index: Execute.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Execute.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Execute.java 21 Mar 2002 08:03:54 -0000 1.9
+++ Execute.java 22 Mar 2002 07:18:09 -0000 1.10
@@ -29,7 +29,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Thomas Haas</a>
- * @version $Revision: 1.9 $ $Date: 2002/03/21 08:03:54 $
+ * @version $Revision: 1.10 $ $Date: 2002/03/22 07:18:09 $
*/
public class Execute
{
@@ -189,11 +189,11 @@
final TaskContext context )
throws TaskException
{
- if( context.isInfoEnabled() )
+ if( context.isVerboseEnabled() )
{
final String cmdline = FileUtils.formatCommandLine(
metaData.getCommand() );
final String message = REZ.getString( "execute.command.notice",
cmdline );
- context.info( message );
+ context.verbose( message );
}
if( context.isDebugEnabled() )
{
1.6 +16 -8
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LogLevel.java
Index: LogLevel.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LogLevel.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- LogLevel.java 12 Mar 2002 08:42:55 -0000 1.5
+++ LogLevel.java 22 Mar 2002 07:18:09 -0000 1.6
@@ -17,7 +17,7 @@
* for using enum to write to logger.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.5 $ $Date: 2002/03/12 08:42:55 $
+ * @version $Revision: 1.6 $ $Date: 2002/03/22 07:18:09 $
*/
public final class LogLevel
extends Enum
@@ -26,10 +26,10 @@
private final static HashMap c_levels = new HashMap();
//standard enums for version of JVM
- public final static LogLevel FATAL_ERROR = new LogLevel( "fatalError" );
public final static LogLevel ERROR = new LogLevel( "error" );
public final static LogLevel WARN = new LogLevel( "warn" );
public final static LogLevel INFO = new LogLevel( "info" );
+ public final static LogLevel VERBOSE = new LogLevel( "verbose" );
public final static LogLevel DEBUG = new LogLevel( "debug" );
/**
@@ -64,18 +64,22 @@
final LogLevel level,
final String message )
{
- if( LogLevel.ERROR == level )
+ if( ERROR == level )
{
context.error( message );
}
- else if( LogLevel.WARN == level )
+ else if( WARN == level )
{
context.warn( message );
}
- else if( LogLevel.INFO == level )
+ else if( INFO == level )
{
context.info( message );
}
+ else if( VERBOSE == level )
+ {
+ context.verbose( message );
+ }
else
{
context.debug( message );
@@ -94,17 +98,21 @@
final String message,
final Throwable throwable )
{
- if( LogLevel.ERROR == level )
+ if( ERROR == level )
{
context.error( message, throwable );
}
- else if( LogLevel.WARN == level )
+ else if( WARN == level )
{
context.warn( message, throwable );
}
- else if( LogLevel.INFO == level )
+ else if( INFO == level )
{
context.info( message, throwable );
+ }
+ else if( VERBOSE == level )
+ {
+ context.verbose( message, throwable );
}
else
{
1.3 +2 -4
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LoggingExecOutputHandler.java
Index: LoggingExecOutputHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LoggingExecOutputHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LoggingExecOutputHandler.java 18 Mar 2002 11:49:46 -0000 1.2
+++ LoggingExecOutputHandler.java 22 Mar 2002 07:18:09 -0000 1.3
@@ -15,7 +15,7 @@
* methods of a [EMAIL PROTECTED] TaskContext}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a>
- * @version $Revision: 1.2 $ $Date: 2002/03/18 11:49:46 $
+ * @version $Revision: 1.3 $ $Date: 2002/03/22 07:18:09 $
*/
public class LoggingExecOutputHandler
implements ExecOutputHandler
@@ -33,9 +33,7 @@
*/
public void stdout( final String line )
{
- // TODO - should be using info(), but currently that is only used
- // when ant is run in verbose mode
- m_context.warn( line );
+ m_context.info( line );
}
/**
1.2 +8 -5
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java
Index: ExecuteJava.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ExecuteJava.java 21 Mar 2002 08:03:55 -0000 1.1
+++ ExecuteJava.java 22 Mar 2002 07:18:09 -0000 1.2
@@ -223,11 +223,14 @@
final String[] args = m_args.getArguments();
// Log message
- final String debugMessage
- = REZ.getString( "executejava.exec-in-jvm.notice",
- m_className,
- FileUtils.formatCommandLine( args ) );
- context.info( debugMessage );
+ if( context.isVerboseEnabled() )
+ {
+ final String debugMessage
+ = REZ.getString( "executejava.exec-in-jvm.notice",
+ m_className,
+ FileUtils.formatCommandLine( args ) );
+ context.verbose( debugMessage );
+ }
// Locate the class
final Class target;
1.5 +2 -1
jakarta-ant/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatProject.java
Index: Ant1CompatProject.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatProject.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Ant1CompatProject.java 22 Mar 2002 05:54:22 -0000 1.4
+++ Ant1CompatProject.java 22 Mar 2002 07:18:09 -0000 1.5
@@ -34,7 +34,7 @@
* Ant1 original, this class contains the extensions.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Darrell DeBoer</a>
- * @version $Revision: 1.4 $ $Date: 2002/03/22 05:54:22 $
+ * @version $Revision: 1.5 $ $Date: 2002/03/22 07:18:09 $
*/
public class Ant1CompatProject extends Project
{
@@ -127,6 +127,7 @@
m_context.info( msg );
break;
case Ant1CompatProject.MSG_VERBOSE:
+ m_context.verbose( msg );
case Ant1CompatProject.MSG_DEBUG:
m_context.debug( msg );
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>