当前位置:  开发笔记 > 运维 > 正文

如何在运行播放命令时关闭颜色代码?

如何解决《如何在运行播放命令时关闭颜色代码?》经验,为你挑选了0个好方法。

当我运行Play命令时,日志在终端中显示出很好的颜色和干净,但是当我在Jenkins中构建我的应用程序时,日志会显示颜色代码,令人难以理解.

命令行日志:

[info] ApplicationSpec
[info] Application should
[info] + send 404 on a bad request
[info] x render the index page
[error]    '401' is not equal to '200' (ApplicationSpec.scala:25)
[info] Total for specification ApplicationSpec
[info] Finished in 134 ms
[info] 2 examples, 1 failure, 0 error
[error] Failed: Total 3, Failed 2, Errors 0, Passed 1
[error] Failed tests:
[error]     ApplicationSpec
[error]     IntegrationSpec
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 23 s, completed Mar 26, 2014 10:00:34 AM

詹金斯记录:

[0m[[0minfo[0m] [0mApplicationSpec[0m
[0m[[0minfo[0m] [0mApplication should[0m
[0m[[0minfo[0m] [0m[32m+[0m send 404 on a bad request[0m
[0m[[0minfo[0m] [0m[33mx[0m render the index page[0m
[0m[[31merror[0m] [0m   '401' is not equal to '200' (ApplicationSpec.scala:25)[0m
[0m[[0minfo[0m] [0mTotal for specification ApplicationSpec[0m
[0m[[0minfo[0m] [0m[34mFinished in 229 ms[0m[0m
[0m[[0minfo[0m] [0m[34m2 examples, 1 failure, 0 error[0m[0m
[0m[[31merror[0m] [0mFailed: Total 3, Failed 2, Errors 0, Passed 1[0m
[0m[[31merror[0m] [0mFailed tests:[0m
[0m[[31merror[0m] [0m   ApplicationSpec[0m
[0m[[31merror[0m] [0m   IntegrationSpec[0m
[0m[[31merror[0m] [0m(test:[31mtest[0m) sbt.TestsFailedException: Tests unsuccessful[0m
[0m[[31merror[0m] [0mTotal time: 6 s, completed Mar 25, 2014 2:28:01 PM[0m

正如你所看到的,Jenkins输出仍然具有相同的内容,但颜色代码使它如此嘈杂,以至于很难弄清楚发生了什么.

我发现有关如何为SBT工具关闭颜色代码的信息有限,但我无法弄清楚如何在play通过Jenkins运行我的构建时通过命令传递此信息.

推荐阅读
雨天是最美
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有