Analyze Logs with Lilith
Steps
Send XWiki's log events to Lilith, a desktop viewer that makes a large volume of events searchable, instead of reading the log file line by line.
- Install Lilith and start it. It listens on port 4560 out of the box, so there is nothing to configure on its side.
- Declare a Logback socket appender in the Logback configuration file. Set RemoteHost to the machine Lilith runs on, which is not necessarily the one XWiki runs on.
<appender name="socket" class="ch.qos.logback.classic.net.SocketAppender"> <RemoteHost>localhost</RemoteHost> <Port>4560</Port> <ReconnectionDelay>170</ReconnectionDelay> </appender> - Reference that appender from the root logger, beside the console one, so the events go to both.
<root level="warn"> <appender-ref ref="stdout"/> <appender-ref ref="socket"/> </root> - Restart the servlet container.
- Lilith fills with XWiki's events as the instance starts, one row per record, colour-coded by level. Selecting a row shows its full message, logger and thread below, and for a page request the thread name is the URL being served.

Raising a logger to DEBUG while Lilith is connected is the usual way to use it: the events collect in Lilith to be searched there, instead of scrolling past in the console.
FAQ
What to do when nothing reaches Lilith?
Check that the appender is referenced from a logger that is actually firing, that port 4560 is reachable from the XWiki machine, and that the servlet container was restarted after the change.
Why does every event show the same timestamp?
Because Logback renamed the field. XWiki ships Logback 1.3 or later, which serialises the event's time as timestamp, while Lilith reads timeStamp, the name Logback 1.2 used. Java serialisation matches fields by name, so Lilith finds none and shows 02:00:00.000 on every row. The same rename of marker to markerList leaves the Marker column empty, and IncludeCallerData no longer has any effect: Logback warns at startup that nothing asks for caller extraction, and the detail pane has no Call Location row. Message, level, logger and thread are unaffected, so filtering and searching still work, but read the sequence from the ID column rather than from the clock. Nothing in XWiki's configuration changes this; it needs a Lilith release built against a current Logback.
Does this replace the log file?
No. The socket appender is an extra destination, and the console appender keeps writing wherever it wrote before. Lilith also only holds what it received while it was running.