Details
-
Improvement
-
Resolution: Fixed
-
Major
-
17.10.14
-
None
Description
Some libraries used by XWiki log through java.util.logging (JUL), for example Lucene (used by the embedded Solr). Contrary to the logs of the other logging APIs (JCL, Log4j 1 and Log4j 2 are already redirected to SLF4J), those logs don't go through SLF4J and Logback: they are printed directly by the JUL handlers of the JVM or the servlet container, with their own format, and they cannot be configured in logback.xml (see for example XWIKI-22012 and XWIKI-25453).
Proposal:
- Install SLF4J's SLF4JBridgeHandler (org.slf4j:jul-to-slf4j) when the XWiki webapp starts, in place of the existing handlers of the JUL root logger (to avoid displaying the messages twice), and put things back when the webapp stops.
- Add Logback's LevelChangePropagator to the logback.xml of the WAR, so that the levels of the JUL loggers follow the Logback configuration (otherwise JUL creates log records even for the levels disabled in Logback).
Attachments
Issue Links
- depends on
-
XCOMMONS-3849 Add an internal helper to redirect java.util.logging to SLF4J
-
- Closed
-
- is duplicated by
-
XWIKI-22012 Lucene related message in logs when starting XWiki 16.2.0 RC1 on Java 21
-
- Closed
-
- relates to
-
XWIKI-25453 Lucene vectorization warning when starting XWiki on Java 21 or later
-
- Open
-