让蚂蚁登录到文件以及屏幕/终端 [英] Getting ant to log to file as well as screen/terminal

查看:25
本文介绍了让蚂蚁登录到文件以及屏幕/终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了这些论坛以及互联网,但找不到明确的答案.我正在执行一个蚂蚁任务.我希望将输出和日志文件一起显示在屏幕上……我该怎么做?

I've searched these forums as well as the internet and could not find a clear answer. I'm executing an ant task. I would like the output to get put to the screen as well as a log file ... how can I do this?

推荐答案

你应该使用 ant 任务 .请参阅 http://ant.apache.org/manual/Tasks/recorder.html.

You should use the ant task <record>. See http://ant.apache.org/manual/Tasks/recorder.html.

在您的 ant 文件中执行以下操作:

In your ant file do something like:

...
<record name="logfile.txt" action="start" append="false" />
...
your ant code...
...
<record name="logfile.txt" action="stop"/>

ant 在两条记录语句之间的输出将写入'logfile.txt'

The output from ant between the two record statements will be written to 'logfile.txt'

这篇关于让蚂蚁登录到文件以及屏幕/终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆