Replace LOG.warn with LOG.warning

logging.warn is deprecated in Python 3.[1]
[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: Ic197980b926fbdcd5fdd1be9c0aea59b27738d54
This commit is contained in:
Van Hung Pham 2017-06-08 22:15:20 +07:00
parent 9fe4385a74
commit 8ef98671cb
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class BaseContextMiddleware(base_middleware.ConfigurableMiddleware):
try:
request_id = resp.request.context.request_id
except AttributeError:
LOG.warn('Unable to retrieve request id from context')
LOG.warning('Unable to retrieve request id from context')
else:
# For python 3 compatibility need to use bytes type
prefix = b'req-' if isinstance(request_id, bytes) else 'req-'