简体   繁体   English

Sonar的不同log4j配置

[英]Different log4j configuration for Sonar

Best wishes for the new year. 祝新的一年。

I have a question regarding the log4j configuration with sonar, especially with cobertura. 我有一个关于声纳,尤其是cobertura的log4j配置的问题。

Let me explain you. 让我解释一下。 I'm working on a big project with a lot of modules and unit tests. 我正在做一个有很多模块和单元测试的大项目。

Those tests can be launched by developer on their workstation, and we don't want the log4j configuration for those tests to be set to DEBUG (too much log in debug). 这些测试可以由开发人员在其工作站上启动,我们不希望将这些测试的log4j配置设置为DEBUG(调试中登录过多)。

But we would like to set the log to debug with cobertura, because we use the "isDebugEnabled", so in the "code coverage" section those line are always set to not tested. 但是我们想将日志设置为使用cobertura进行调试,因为我们使用了“ isDebugEnabled”,因此在“代码覆盖率”部分中,这些行始终设置为未测试。

So is it possible to change the log4j configuration just for cobertura ? 那么是否可以仅针对cobertura更改log4j配置?

We use sonar via maven for information. 我们通过Maven使用声纳获取信息。

我终于更改了Maven声纳配置文件中的log4g文件链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM