[slf4j-user] how to properly activate the jul-to-slf4j bridge
Ceki Gülcü
ceki at qos.ch
Sat Sep 16 23:36:10 CEST 2023
Hi Shawn,
Comments below.
On 9/16/2023 10:45 PM, Shawn Heisey via slf4j-user wrote:
[cut]
> I have learned that although Solr does include the jul-to-slf4j
> jar, this bridge does not get activated just by having the jar in
> the classpath. It must be activated either in the code or in the
> JUL config.
That is correct.
> Solr has an admin UI with a page that shows all the loggers that
> exist for log4j2 and allows the levels for each logger to be
> changed on the fly. With the log4j bridge for JUL, this page has
> entries for Lucene classes, but I have not been able to get those
> to show up with the slf4j bridge.
Please note that changing the level of the slf4j backend, log4j 2 in
your case, does not affect JUL levels.
You would need to propagate changes in log4j2 levels into JUL.
You could do so by hand.
Logback has an extension called LevelChangePropagator that does this
automatically.
I presume log4j2 has a similar extension.
I hope this helps and let us know about your progress,
--
Ceki Gülcü
Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
More information about the slf4j-user
mailing list