Custom service filling up syslog

transient_loop asked:

We have a custom service we start via systemd. File is stored at /etc/systemd/system/custom.service.

That’s all great but we just had a situation where the disk ran full. I guess systemd catches all of the process’ stdout and writes it into /var/log/syslog.

Our custom service writes all of STDOUT into actual log files. So we could ignore syslog.

How can I suppress everything from stdout being written to syslog?

My answer:


As shown in the documentation, you can redirect StandardOutput= to wherever you wish. By default this is journal. You can change it to null instead, to cause standard output to be discarded.

[Service]
StandardOutput=null

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.