Monitoring

Write JSON logs

Make the bot write machine readable log lines for log tools such as Loki.

This page is for people who collect logs with a tool. You can skip it otherwise.

Turn JSON logs on

Add this line to the bot config.json:

"logFormat": "json"

The bot then writes one JSON object per line instead of the colored window output.

Fields

FieldMeaning
timeTime of the message in UTC.
levelinfo, warn, error, success or debug.
moduleThe part of the bot that wrote it, for example bot, mute, metrics, telemetry or updates.
processgateway, or cluster-0, cluster-1 and so on.
msgThe message. Tokens and secrets are hidden.
errorOnly present when there is extra detail or an error. Secrets are hidden here too.