log4j - Sonar rule to be validate logging framework -


I have to use the only slf4j framework in my project instead of log4j what custom sonar rule to set the validity logging framework There is no way and if we use log4j then it is to show a violation.

Of course, we can use logj-over-slf4j to avoid compilation errors. But I need to use slf4j strictly.

Yes, this can be done (I'm assuming that you are using Java, Right?)

You can activate the check from the checklist repository in your Java quality profile. Be sure to add org.apache.log4j to illegalPkgs list. Such as illegalPkgs to sun, com.sun, org.apache.log4j .

In addition, in Sonrakub, you can activate the rule here, give you the toClasses property as wildcard expression such as org.apache.log4j. ** .

.

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -