
Ich verwende OSX 10.10.4 und habe dort einen Cron-Job geplant (er führt ein Python-Skript aus). Die Protokolldatei ist dort gemäß dieser Antwort aktiviert -https://superuser.com/a/595825/172606. Aber das erstellte Protokoll enthält nur Informationen über Cron-Job-Starts und Crontab-Dateiaktualisierungen. Gibt es eine Möglichkeit, dort Informationen aus meinem Python-Skript abzulegen? (möchte keinseparates Protokollfür jedes Python-Skript, das ich habe)
Antwort1
Ich weiß nicht, wie es bei OSX ist, aber unter Linux haben wir den logger
Befehl, um Protokolleinträge über Syslog hinzuzufügen:
$ logger -p cron.info 'some important message'