Is it possible to change the package log level in log4j?

I currently have a library that registers certain information as ERROR. If I change my log4j settings as follows:

log4j.logger.com.company.theirpackage.foo=OFF

which will completely disable library logging. Nevertheless, I would very much like to see the information, but it was registered at the WARN or INFO level. In other words, when this particular code calls log.error(), I want it to be as if they were calling log.warn()or log.info().

Is there any way to do this with log4j?

+3
source share
2 answers

, , , , . - / .

, ?

+2
+1

Source: https://habr.com/ru/post/1728366/


All Articles