A
A
AlmazKayum2018-08-14 00:47:49
linux
AlmazKayum, 2018-08-14 00:47:49

Where are the logs written?

Good time.
I always ran my python scripts through nohup, they often crashed, here on the toaster it was advised to run scripts as a system process using systemd.
I configured the work using the article
https://jeckill.ru/zapusk-python-skripta-kak-servis/
All scripts work.
Question: where are the logs written? Or where where to specify that they were written somewhere?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2018-08-14
@AlmazKayum

here on the toaster it was advised to run scripts as a system process using systemd.
Correctly.
where are the logs written?
By default in journald, but you can change it.
And you can read it like this:journalctl -u юнит

R
Radjah, 2018-08-14
@Radjah

/var/log/journal in binary form. For reading journalctl is used. All output from stdout and stderr is written to the logs.
If you want direct text, you can specify the StandardOutput directive , but the file:path parameter only works from the 236th version. You can write syslog and resolve the logging for them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question