Skip to content

We probably use wrong log4j related dependencies #28

@other019

Description

@other019

Expected behaviour:
Put log4j config to src/main/resources to be able to configure logging.
Actual behaviour:
Either version of config https://logging.apache.org/log4j/2.x/manual/configuration.html#XML for log4j in version 2 or https://logging.apache.org/log4j/2.x/manual/migration.html for log4j in version 1 yields an error.

Steps to reproduce:
Put log4j.xml config to src/main/resources in project using mrchecker.

Comments:
https://stackoverflow.com/questions/47574644/difference-between-slf4j-log4j12-vs-log4j
excerpt from mvn dependency:tree of mrchecker-core-module

[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.2:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.2:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] |  \- log4j:log4j:jar:1.2.17:compile

it is showing that we are using log4j api and core in version 2.2 but slf4j which is a facade for loger is using log4j 1.2 (probably thats what 12 stand from).

I will provide the fix in near future.
Affected version:
OS: Windows

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions