我正在触发一个蚂蚁脚本(通过巡航控制),并且希望能够将特定蚂蚁目标的 std 输出和 std 错误 转储到一个纯文本文件.
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 等)自己提供此功能(通常通过 output 和 error 参数)
Beyond that, certain tasks (exec, java, etc) offer this functionality by themselves (usually by means of output and error arguments)
更多推荐
如何在 ant 脚本中重定向 stdout stderr?
发布评论