我怎样才能重定向蚂蚁EXEC任务输出到两个文件和stdout? [英] How can I redirect ant exec task output to both a file and stdout?

查看:190
本文介绍了我怎样才能重定向蚂蚁EXEC任务输出到两个文件和stdout?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是蚂蚁(1.8.2)EXEC任务启动一个子进程。我需要的子过程的输出被示为正常蚂蚁控制台输出的一部分,而且在一个文件中被捕获。

I am using the ant (1.8.2) exec task to start a child process. I need the output of the child process to be shown as part of the normal ant console output, but also be captured in a file.

推荐答案

您需要重定向

由于蚂蚁1.6.3它称为一个选项 alwayslog

Since Ant 1.6.3 it has an option called alwayslog.

使用这样的:

<exec executable="mycommand">
   <redirector output="myfile.txt" alwayslog="true"/>           
</exec>

这篇关于我怎样才能重定向蚂蚁EXEC任务输出到两个文件和stdout?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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