mirror of
https://github.com/sprockets/sprockets.mixins.correlation.git
synced 2024-11-23 11:19:53 +00:00
correlation_id_logger: Add missing import.
This commit is contained in:
parent
c38e80da17
commit
aef860f833
1 changed files with 4 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue