0

Currently systemd service files will redirect the logs to journal buffer by default. But I need to get all the userspace services logs as part of /dev/kmsg buffer.

I was able to add StandardOutput=file:/dev/kmsg to a service file and that works only for that service.

But when I added DefaultStandardOutput=file:/dev/kmsg (uncommnet it) in /etc/systemd/system.conf, its not getting reflected in every service file (cross checked with systemctl show ).

Any pointers on how to make this work from a centrailzed location than every service file, would be helpful.a common place that affects every service file.

Rckzz
  • 1
  • When you set `DefaultStandardOutput`, is that effecting *any* services? – larsks Sep 03 '22 at 01:26
  • Nope. None of the services. – Rckzz Sep 08 '22 at 00:15
  • It's not possible with journald to log *some messages* (or messages of specific services) to different files. But you can do this with rsyslog, which can be configured in `/etc/rsyslog.conf`. – eDonkey Sep 14 '22 at 12:19

0 Answers0