This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-e2381afa-78d4-4986-86d8-773ae82b2d6f XWIKI-25494 Open

Redirect the java.util.logging logs to SLF4J

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-204d0c6a-b020-4755-b433-073c0966218e Thomas Mortagne created this issue on 22/Oct/26 14:10
 
Summary: Redirect the java.util.logging logs to SLF4J
Issue Type: cid:jira-generated-image-avatar-e2381afa-78d4-4986-86d8-773ae82b2d6f Improvement
Affects Versions: 17.10.14
Assignee: Unassigned
Components: Logging
Created: 22/Oct/26 14:10
Priority: cid:jira-generated-image-static-major-bebf8853-cfe3-4099-829a-467e7c19bdf0 Major
Reporter: Thomas Mortagne
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).
 
 

2 updates

 
cid:jira-generated-image-avatar-204d0c6a-b020-4755-b433-073c0966218e Changes by Thomas Mortagne on 22/Oct/26 14:10
 
Fix Version: 18.10.0-rc-1
Assignee: Thomas Mortagne