correlation_id_logger: Add missing import.

This commit is contained in:
Dave Shawley 2016-06-20 15:57:59 -04:00
parent c38e80da17
commit aef860f833

View file

@ -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: