Given third party library whose source code I cannot change:
package thirdpartylibrary;
class ThirdPartyClass {
void thirdPartyMethod() {
log.error("Something happened");
}
}
In the log file I would like to see:
INFO Something happened
instead of:
ERROR Something happened
How to change log level for thirdpartylibrary.ThirdPartyClass
via logback.xml
or similar configuration?
I am aware that I could turn off logging via:
<logger name="thirdpartylibrary.ThirdPartyClass" level="OFF"/>
But then I would not know that Something happened
at all.
Reason why I would like to achieve it is that I would like to take log levels seriously as described here: https://stackoverflow.com/a/8021604/2866645
I.e. ERROR level should mean that our operations team should be woken up at 2AM.
I would like to eliminate false positives.
Thanks for your feedback!