From aef860f8335373a4be4e2cd57d1e43f302b34e0d Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Mon, 20 Jun 2016 15:57:59 -0400 Subject: [PATCH] correlation_id_logger: Add missing import. --- sprockets/mixins/correlation/mixins.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sprockets/mixins/correlation/mixins.py b/sprockets/mixins/correlation/mixins.py index 92ec499..121c4d6 100644 --- a/sprockets/mixins/correlation/mixins.py +++ b/sprockets/mixins/correlation/mixins.py @@ -1,6 +1,7 @@ import uuid import tornado.gen +import tornado.log if tornado.version_info[0] >= 4: from tornado.concurrent import is_future @@ -112,11 +113,11 @@ def correlation_id_logger(handler): is processing the client request. """ if handler.get_status() < 400: - log_method = log.access_log.info + log_method = tornado.log.access_log.info elif handler.get_status() < 500: - log_method = log.access_log.warning + log_method = tornado.log.access_log.warning else: - log_method = log.access_log.error + log_method = tornado.log.access_log.error request_time = 1000.0 * handler.request.request_time() correlation_id = getattr(handler, "correlation_id", None) if correlation_id is None: