From c43b15ce0727842e1388c0b6facefc3f7e73839c Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sat, 7 Apr 2018 10:43:35 +0100 Subject: Fix logging in gunicorn_config --- gunicorn_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gunicorn_config.py') diff --git a/gunicorn_config.py b/gunicorn_config.py index 7e17b0cc..e4b66135 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -1,12 +1,12 @@ # coding=utf-8 -def when_ready(_server): +def when_ready(server): """ server hook that only runs when the gunicorn master process loads """ - print("Creating tables...") + server.log.info("Creating tables...") from pysite.database import RethinkDB db = RethinkDB(loop_type=None) created = db.create_tables() - print(f"Created {created} tables.") + server.log.info(f"Created {created} tables.") -- cgit v1.2.3