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:
parent
9fe4385a74
commit
8ef98671cb
|
@ -71,7 +71,7 @@ class BaseContextMiddleware(base_middleware.ConfigurableMiddleware):
|
||||||
try:
|
try:
|
||||||
request_id = resp.request.context.request_id
|
request_id = resp.request.context.request_id
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
LOG.warn('Unable to retrieve request id from context')
|
LOG.warning('Unable to retrieve request id from context')
|
||||||
else:
|
else:
|
||||||
# For python 3 compatibility need to use bytes type
|
# For python 3 compatibility need to use bytes type
|
||||||
prefix = b'req-' if isinstance(request_id, bytes) else 'req-'
|
prefix = b'req-' if isinstance(request_id, bytes) else 'req-'
|
||||||
|
|
Loading…
Reference in New Issue