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: