当我在 Jenkins (Jenkins)中运行Maven目标(例如“mvn测试”)时,由于出现了颜色控制字符,因此很难读取日志(请参见下面的示例)。无论如何,有没有删除颜色格式?
[[1;34mINFO[m] [1m-------------------------------------------------------------------[m
[[1;34mINFO[m] [1;32mBUILD SUCCESS[m
[[1;34mINFO[m] [1m-------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 16.097 s
[[1;34mINFO[m] Finished at: 2017-04-26T11:23:06-04:00
[[1;34mINFO[m] Final Memory: 41M/100M
[[1;34mINFO[m] [1m-------------------------------------------------------------------[m
最佳答案
感谢khmarbaise在对我的问题的评论中的回答:
这解决了这个问题,我的输出现在看起来像这样(好得多):
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.507 s
[INFO] Finished at: 2017-04-27T05:30:07-04:00
[INFO] Final Memory: 41M/100M
[INFO] ------------------------------------------------------------------------