summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-10-14 14:09:44 +0300
committerLars Wirzenius <liw@liw.fi>2017-10-14 14:57:33 +0300
commite9007a842c179e5b9861dbd6c868396c50c52be1 (patch)
tree45be28b40d4c7e2e5445af920ebeea591949aeef
parent4ece3e95eb0122bfa122fd6a1bfeb5eea2531478 (diff)
downloadick2-e9007a842c179e5b9861dbd6c868396c50c52be1.tar.gz
Fix: log startup to stderr (hence syslog), instead of a file
Also, put log files in /var/log, not /tmp
-rw-r--r--ick_controller.py2
-rw-r--r--start_ick2
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