I have a few Maven dependencies in my Java project that clutter the console output with redundant log info. I want to disable such logging.
Setting the additivity
property to false
might help. But could not use it properly.
I am looking for a log4j.xml
config that will only print log output (warn
, error
, …) from my project and not from any dependencies.
Advertisement
Answer
It looks like the log4j2.xml
was overriding all other configs. As of now, I have switched that dependency off. Maybe log4j2 > log4j
hence the issue. Also, XML
gets a higher priority over properties
as I have seen somewhere.