donaldp 01/12/29 16:33:53
Modified: proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
Echo.java
Log:
Echo no longer handles log messages - only useful for writing to files.
Revision Changes Path
1.9 +2 -44
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java
Index: Echo.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Echo.java 30 Dec 2001 00:16:24 -0000 1.8
+++ Echo.java 30 Dec 2001 00:33:53 -0000 1.9
@@ -24,7 +24,6 @@
private String m_message = "";// required
private File m_file;
private boolean m_append;
- private EchoLevel m_echoLevel;
/**
* Shall we append to an existing file?
@@ -47,26 +46,6 @@
}
/**
- * Set the logging level to one of
- * <ul>
- * <li> error</li>
- * <li> warning</li>
- * <li> info</li>
- * <li> verbose</li>
- * <li> debug</li>
- * <ul><p>
- *
- * The default is "warning" to ensure that messages are
- * displayed by default when using the -quiet command line
option.</p>
- *
- * @param echoLevel The new Level value
- */
- public void setLevel( final EchoLevel echoLevel )
- {
- m_echoLevel = echoLevel;
- }
-
- /**
* Sets the message variable.
*
* @param msg Sets the value for the message variable.
@@ -84,7 +63,7 @@
public void addText( final String message )
throws TaskException
{
- m_message += getProject().replaceProperties( message );
+ m_message = message;
}
/**
@@ -97,7 +76,7 @@
{
if( m_file == null )
{
- doLog();
+ throw new TaskException( "Echo only used to write to files now
!");
}
else
{
@@ -124,27 +103,6 @@
}
}
}
- }
- }
-
- private void doLog()
- {
- final String option = m_echoLevel.getValue();
- if( option.equals( "error" ) )
- {
- getLogger().error( m_message );
- }
- else if( option.equals( "warning" ) )
- {
- getLogger().warn( m_message );
- }
- else if( option.equals( "info" ) )
- {
- getLogger().info( m_message );
- }
- else
- {
- getLogger().debug( m_message );
}
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>