From e9007a842c179e5b9861dbd6c868396c50c52be1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 14 Oct 2017 14:09:44 +0300 Subject: Fix: log startup to stderr (hence syslog), instead of a file Also, put log files in /var/log, not /tmp --- ick_controller.py | 2 +- start_ick | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ick_controller.py b/ick_controller.py index 59ac86a..a7a1c51 100644 --- a/ick_controller.py +++ b/ick_controller.py @@ -59,7 +59,7 @@ def load_config(filename, defconf): def main(): logger = logging.getLogger() logger.setLevel(logging.DEBUG) - handler = logging.FileHandler('/tmp/ick.log') + handler = logging.StreamHandler(sys.stderr) logger.addHandler(handler) logging.info('Starting ick controller main program') diff --git a/start_ick b/start_ick index 2878f95..add1f61 100644 --- a/start_ick +++ b/start_ick @@ -19,6 +19,6 @@ set -eux export ICK_CONTROLLER_CONFIG=/etc/ick/controller.conf gunicorn3 \ --bind 127.0.0.1:12765 \ - --log-file /tmp/gunicorn3.log \ + --log-file /var/log/ick/gunicorn3.log \ --log-level debug \ ick_controller:app -- cgit v1.2.1