我有一些程序(我没有源代码访问权)可以更新控制台一行上的进度条,从命令提示符运行时看起来不错。但是,当TeamCity运行这些程序并捕获stdout时,它会将每个更新捕获为单独的一行,这将占用大量的日志空间。有什么方法可以改善这种行为吗?我正在运行TeamCity 2018.1(内部版本58245)。
这就是我正在谈论的那种事情(想象一下,它报道了成千上万次):
[09:15:55][Step 2/2] MyScript: Waiting... (|)
[09:15:55][Step 2/2] MyScript: Waiting... (/)
[09:15:56][Step 2/2] MyScript: Waiting... (-)
[09:15:56][Step 2/2] MyScript: Waiting... (\)
[09:15:56][Step 2/2] MyScript: Waiting... (|)
[09:15:56][Step 2/2] MyScript: Waiting... (/)
[09:15:56][Step 2/2] MyScript: Waiting... (-)
[09:15:56][Step 2/2] MyScript: Waiting... (\)
[09:15:56][Step 2/2] MyScript: Waiting... (|)
[09:15:56][Step 2/2] MyScript: Waiting... (/)
[09:15:56][Step 2/2] MyScript: Waiting... (-)
[09:15:57][Step 2/2] MyScript: Waiting... (\)
[09:15:57][Step 2/2] MyScript: Waiting... (|)
[09:15:57][Step 2/2] MyScript: Waiting... (/)
[09:15:57][Step 2/2] MyScript: Waiting... (-)
[09:15:57][Step 2/2] MyScript: Waiting... (\)
[09:15:57][Step 2/2] MyScript: Waiting... (|)
答案 0 :(得分:0)
如果您无权访问该程序的源代码,则唯一的选择是抑制其输出,例如:
yourprogram.exe > nul
如果您需要更多选项,请查看以下内容:Suppress command line output