Fazendo os prints do Python aparecerem no systemctl status
- fazer todos os prints passarem o parâmetro flush=True
[code language="python"] import functools print = functools.partial(print, flush=True) [/code]
- chamar o python e direcionar as saídas, tipo 1>/dev/null 2>/dev/null
- chamar o python com o parâmetro -u (não funcionou comigo)
Referência
https://stackoverflow.com/questions/230751/how-to-flush-output-of-print-function
https://fhackts.wordpress.com/2014/11/27/systemd-journal-not-showing-python-3-print/