nblock's ~

Temporarily disable journalctl output coloring

While debugging an issue with OpenLDAP, I noticed that journalctl colors its output. From the man page:

When outputting to a tty, lines are colored according to priority: lines of level ERROR and higher are colored red; lines of level NOTICE and higher are highlighted; lines of level DEBUG are colored lighter grey; other lines are displayed normally.

While this is nice for higher priority levels such as ERROR, it is not useful for messages with DEBUG priority. Those appear in light grey which makes them hard to read on terminal themes with a light background.

The easiest way is to set the environment variable SYSTEMD_COLORS which overrides automatic coloring. To follow the OpenLDAP debug log:

$ sudo SYSTEMD_COLORS=false journalctl -u slapd -f

permalink

tagged journalctl