diff --git a/configs/gunicorn_config.py b/configs/gunicorn_config.py --- a/configs/gunicorn_config.py +++ b/configs/gunicorn_config.py @@ -119,16 +119,16 @@ def child_exit(server, worker): def pre_request(worker, req): - return - worker.log.debug("[<%-10s>] PRE WORKER: %s %s", - worker.pid, req.method, req.path) + worker.start_time = time.time() + worker.log.debug( + "GNCRN PRE WORKER: %s %s", req.method, req.path) def post_request(worker, req, environ, resp): - return - worker.log.debug("[<%-10s>] POST WORKER: %s %s resp: %s", worker.pid, - req.method, req.path, resp.status_code) - + total_time = time.time() - worker.start_time + worker.log.debug( + "GNCRN POST WORKER [cnt:%s]: %s %s resp: %s, Load Time: %.3fs", + worker.nr, req.method, req.path, resp.status_code, total_time) class RhodeCodeLogger(Logger):