如何重定向标准输出标准错误Ant脚本? [英] How to redirect stdout stderr in an ant script?
问题描述
我触发ant脚本(通过巡航控制),并希望能为转储STD出和std ERR 的特别Ant目标以一个普通的文本文件
I am triggering an ant script (via cruise control), and would like to be able to dump the std out and std err for a particular ant target to a plain text file.
是的,我知道,巡航控制系统已经做维护包含这些信息(其中包括许多其他的东西)的XML日志文件,但对于可移植性原因,我需要这在Ant脚本本身。发生
Yes, I am aware that cruise control already does maintain an XML log file containing this information (among many other things), but for portability reasons, I need this to happen from the ant script itself.
这是可能的,如果是这样,怎么办呢?
Is this possible, and if so, how to do it?
非常感谢!
推荐答案
借助记录的任务可能是能够做到你想要什么:
The recorder task may be able to do what you want:
<record name="log.txt" action="start"/>
...
<record name="log.txt" action="stop"/>
除此之外,某些任务(EXEC,JAVA等),由输出
的方式提供自己(通常这个功能和错误
参数)
Beyond that, certain tasks (exec, java, etc) offer this functionality by themselves (usually by means of output
and error
arguments)
这篇关于如何重定向标准输出标准错误Ant脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!