diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java index e44a7e1d1..450283a40 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java @@ -24,7 +24,6 @@ public class Echo private String m_message = "";// required private File m_file; private boolean m_append; - private EchoLevel m_echoLevel; /** * Shall we append to an existing file? @@ -46,26 +45,6 @@ public class Echo m_file = file; } - /** - * Set the logging level to one of - *
- * - * The default is "warning" to ensure that messages are - * displayed by default when using the -quiet command line option.
- * - * @param echoLevel The new Level value - */ - public void setLevel( final EchoLevel echoLevel ) - { - m_echoLevel = echoLevel; - } - /** * Sets the message variable. * @@ -84,7 +63,7 @@ public class Echo public void addText( final String message ) throws TaskException { - m_message += getProject().replaceProperties( message ); + m_message = message; } /** @@ -97,7 +76,7 @@ public class Echo { if( m_file == null ) { - doLog(); + throw new TaskException( "Echo only used to write to files now !"); } else { @@ -126,25 +105,4 @@ public class Echo } } } - - 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 ); - } - } } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Echo.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Echo.java index e44a7e1d1..450283a40 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Echo.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Echo.java @@ -24,7 +24,6 @@ public class Echo private String m_message = "";// required private File m_file; private boolean m_append; - private EchoLevel m_echoLevel; /** * Shall we append to an existing file? @@ -46,26 +45,6 @@ public class Echo m_file = file; } - /** - * Set the logging level to one of - *- * - * The default is "warning" to ensure that messages are - * displayed by default when using the -quiet command line option.
- * - * @param echoLevel The new Level value - */ - public void setLevel( final EchoLevel echoLevel ) - { - m_echoLevel = echoLevel; - } - /** * Sets the message variable. * @@ -84,7 +63,7 @@ public class Echo public void addText( final String message ) throws TaskException { - m_message += getProject().replaceProperties( message ); + m_message = message; } /** @@ -97,7 +76,7 @@ public class Echo { if( m_file == null ) { - doLog(); + throw new TaskException( "Echo only used to write to files now !"); } else { @@ -126,25 +105,4 @@ public class Echo } } } - - 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 ); - } - } }