Distributed James Server — Logging

We recommend to closely monitoring ERROR and WARNING logs. Those logs should be considered not normal.

If you encounter some suspicious logs:

  • If you have any doubt about the log being caused by a bug in James source code, please reach us via the bug tracker, the user mailing list or our Gitter channel (see our community page)

  • They can be due to insufficient performance from tier applications (eg cassandra timeouts). In such case we advise you to conduct a close review of performances at the tier level.

Leveraging filters in Kibana discover view can help to filter out ''already known'' frequently occurring logs.

When reporting ERROR or WARNING logs, consider adding the full logs, and related data (eg the raw content of a mail triggering an issue) to the bug report in order to ease resolution.

Logging configuration

Distributed James Server uses logback as a logging library and FluentBit as centralize logging.

Information about logback configuration can be found here.

It is possible to configure a logback appender to expose structured logging as JSON using logback’s JsonEncoder like in the following example:

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
         <encoder class="ch.qos.logback.classic.encoder.JsonEncoder">
             <withFormattedMessage>true</withFormattedMessage>
         </encoder>
         <immediateFlush>false</immediateFlush>
</appender>

Note that dedicated formatters can be added to your docker containers :

  • Add the corresponding JAR onto the /root/libs folder of docker container

  • Add the JAR path onto /root/jib-classpath-file for it to be loaded on the classpath by the JAVA runtime.