2

I'm on Ubuntu 20.04, and journalctl will not provide colored output for my logs. I verified, and those logs do have colored output if not piped through journalctl. I configured my terminal as xterm-256color. I have tried the following:

  1. I tried applying -a option to journalctl.
  2. I tried setting SYSTEMD_COLORS=true.
  3. I tried setting SYSTEMD_COLORS=256.
  4. I tried applying -o cat option to journalctl.

I know that there are other ways to pipe the output through other log colorizers such as lolcat and ccze, to mention a few. However, I don't understand why it is not possible to use journalctl colorized if there are options that support it.

PSS
  • 121
  • 1

1 Answers1

0

install ccze

apt install ccze

then use it like

journalctl -fu serviceName | ccze
Eslam Badawy
  • 109
  • 2
  • On RHEL the output is put in a buffer; you might need to see all the use cases in `man ccze`. I solved using `journalctl -u serviceName | ccze -A` – Richard Tyler Miles Sep 18 '22 at 22:16