是否可以修改Maven控制台输出以隐藏[INFO]日志记录? [英] Is is possible to modify the maven console output to hide the [INFO] logging?

查看:867
本文介绍了是否可以修改Maven控制台输出以隐藏[INFO]日志记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以修改maven的输出,例如隐藏以[INFO]开头的行,还是可以看到以[DEBUG]开头的行?

I was wondering if it was possible to modify the output from maven to for example hide the lines that start with [INFO] or to be able to see lines that start with [DEBUG]?

推荐答案

我认为没有办法将其配置为记录器,但是mvn -q隐藏[INFO]行,而mvn -X显示调试消息

I don't think there is a way to configure it as a logger but mvn -q hides the [INFO] lines and mvn -X shows the debug messages.

2015年更新:较新版本的maven已添加了一个配置文件,尽管最终作为全局每次安装配置,请检查$ mavenInstallationDir/conf/logging/simplelogger.properties(如果该文件不存在),则最终可以在该文件中使用.您的Maven版本可能太旧了,我相信它是在3.1版本中添加的

Update in 2015: newer versions of maven have added a config file where this is finally possible although as a global per install configuration, check on your $mavenInstallationDir/conf/logging/simplelogger.properties if the file doesn't exist then your maven version is probably too old, I believe it was added on the 3.1 release

这篇关于是否可以修改Maven控制台输出以隐藏[INFO]日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆