Replace Logback with Another SLF4J Provider
Steps
Run XWiki's logging on a backend other than Logback by swapping the SLF4J provider in WEB-INF/lib, at the cost of the features XWiki builds on Logback.
- Remove the Logback provider from WEB-INF/lib.
logback-classic-*.jar logback-core-*.jar - Remove XWiki's own Logback integration, which has nowhere left to plug into. This is the step with a visible consequence: DefaultLoggerManager is the only implementation XWiki has of the component the Logging Application reads and writes levels through, and LogbackEventGenerator is what turns log records into the events the per-job logs are built from. Without them, the administration screen has nothing to show and jobs such as an extension installation no longer keep a log of their own.
xwiki-commons-logging-logback-*.jar - Remove the SLF4J bridge for the framework you are moving to, or its records will be handed to SLF4J and then back to itself. Moving to Log4j 2 means removing both of the Log4j bridges.
log4j-over-slf4j-*.jar only if you move to Log4j 1.x log4j-to-slf4j-*.jar only if you move to Log4j 2 - Add the backend and its SLF4J 2 provider. For Log4j 2 that is log4j-core plus log4j-slf4j2-impl; log4j-api is already in WEB-INF/lib, so check the version before adding a second copy.
- Write the backend's own configuration file into WEB-INF/classes, since logback.xml means nothing to it, and give it at least the levels the Logback configuration had.
- Restart the servlet container. XWiki's startup records now come out through the new backend, wherever its configuration sends them, and the line format is the one that configuration defines rather than Logback's.
2026-11-10 16:12:37,160 [main] INFO o.x.e.i.ServletEnvironment - Using permanent directory [data]
FAQ
Why is there no binding jar such as slf4j-log4j12 to add?
Because XWiki ships SLF4J 2, which resolves its provider through the Java ServiceLoader rather than through a binding jar. slf4j-log4j12 is an SLF4J 1.x binding and is never picked up; what you add is the provider the backend itself publishes, log4j-slf4j2-impl in the case of Log4j 2.
Do third-party libraries still log?
Yes, through whichever bridges you left in place. jcl-over-slf4j, log4j-over-slf4j, log4j-to-slf4j and jul-to-slf4j each hand one framework's records to SLF4J, and SLF4J then hands them to the new provider.
Is this supported?
Logback is what XWiki is built, shipped and tested on. Everything above is possible, not recommended, and it is on you to keep it working across upgrades.