From 79bbd8fe38cfed152bffd60a1e6a6df50301db2a Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 30 Jul 2021 10:39:46 +0200 Subject: [PATCH] systemd: line-buffered logging --- contrib/systemd/copyparty.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/systemd/copyparty.service b/contrib/systemd/copyparty.service index 11fc7d55..0e48436a 100644 --- a/contrib/systemd/copyparty.service +++ b/contrib/systemd/copyparty.service @@ -13,6 +13,10 @@ # But note that journalctl will get the timestamps wrong due to # python disabling line-buffering, so messages are out-of-order: # https://user-images.githubusercontent.com/241032/126040249-cb535cc7-c599-4931-a796-a5d9af691bad.png +# +# enable line-buffering for realtime logging (slight performance cost): +# modify ExecStart and prefix it with `/bin/stdbuf -oL` like so: +# ExecStart=/bin/stdbuf -oL /usr/bin/python3 [...] [Unit] Description=copyparty file server