ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <br...@callenish.com>
Subject Re: live view of the file contents
Date Wed, 04 Jan 2012 16:32:37 GMT
On 04/01/2012 1:33 AM, Raja Nagendra Kumar wrote:
> If we like to open the log file after tomcat starting.. what is the best way
> to see the content coming in dos console... as and when some thing is
> written to log file..
>

I don't think there is a way to do this strictly with Ant tasks (I would 
have expected it in the concat task or the tail filter), but from the 
command line of a Unix system you use:

     tail -f file.log

If you wanted Ant to do that for some reason, you could stick that 
command in an exec task or use a script to accomplish the same thing. It 
is a bad idea, though, because it leaves Ant running forever just to 
watch a log file, and the combination of Java and Ant is quite large. 
You are better off running the "tail -f" command by itself, from outside 
of Ant. Perhaps started in a batch file that has previously run Ant.

For Windows, you could install cygwin to get the same program. Or google 
for other tail programs that have the follow feature.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message