java left logo
java middle logo
java right logo
 

Home arrow Other API Tips arrow Ant arrow How to use Echo task
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 3918
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
How to use Echo task E-mail
User Rating: / 4
PoorBest 

Echo

Description

Echoes a message to the current loggers and listeners which means System.out unless overridden. A level can be specified, which controls at what logging level the message is filtered at.

The task can also echo to a file, in which case the option to append rather than overwrite the file is available, and the level option is ignored

Parameters

Attribute Description Required
message the message to echo. Yes, unless data is included in a character section within this element.
file the file to write the message to. No
append Append to an existing file? No - default is false.
level Control the level at which this message is reported. One of "error", "warning", "info", "verbose", "debug" No - default is "warning".

Examples

<echo message="Hello, world"/>
<echo message="Embed a line break:${line.separator}"/>

<echo>Embed another:${line.separator}</echo>
<echo>This is a longer message stretching over
two lines.
</echo>
<echo>
This is a longer message stretching over
three lines; the first line is a blank

</echo>
As XML parsers are wont to do, the first newline in the text element has been included in the text.
<echo message="Deleting drive C:" level="debug"/>
A message which only appears in -debug mode.
<echo level="error">

Imminent failure in the antimatter containment facility.
Please withdraw to safe location at least 50km away.  
</echo>
A message which appears even in -quiet mode.
<echo file="runner.csh" append="false">#\!/bin/tcsh
java-1.3.1 -mx1024m ${project.entrypoint} $$*
</echo>
Generate a shell script by echoing to a file. Note the use of a double $ symbol to stop Ant filtering out the single $ during variable expansion

Source: Apache Ant


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.