Merge pull request #10 from sprockets/tornado43-fixes

tornado_log_function: Make work with Tornado 4.3.
This commit is contained in:
Gavin M. Roy 2015-12-11 12:59:01 -05:00
commit 37ff1180f9
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,10 @@
Version History
===============
`Next Release`_
---------------
- Updated ``tornado_log_function`` to work with Tornado 4.3.
`1.3.2`_ Oct 2, 2015
---------------------
- Switch to packaging as a package instead of a py_module.
@ -40,6 +44,8 @@ Version History
---------------------
- Added :class:`sprockets.logging.ContextFilter`
.. _Next Release: https://github.com/sprockets/sprockets.logging/compare/1.3.2...master
.. _1.3.2: https://github.com/sprockets/sprockets.logging/compare/1.3.1...1.3.2
.. _1.3.1: https://github.com/sprockets/sprockets.logging/compare/1.3.0...1.3.1
.. _1.3.0: https://github.com/sprockets/sprockets.logging/compare/1.2.1...1.3.0

View file

@ -145,7 +145,7 @@ def tornado_log_function(handler):
handler.request.headers.get('Correlation-ID', None))
log_method('', {'correlation_id': correlation_id,
'duration': 1000.0 * handler.request.request_time(),
'headers': handler.request.headers,
'headers': dict(handler.request.headers),
'method': handler.request.method,
'path': handler.request.path,
'protocol': handler.request.protocol,