Merge "Replace deprecated LOG.warn with LOG.warning"

This commit is contained in:
Jenkins 2016-03-12 03:40:27 +00:00 committed by Gerrit Code Review
commit 4ea1ade893
3 changed files with 13 additions and 13 deletions

View File

@ -195,11 +195,11 @@ class PikaDriver(base.BaseDriver):
self._declare_rpc_exchange(exchange,
expiration_time - time.time())
except pika_drv_exc.ConnectionException as e:
LOG.warn("Problem during declaring exchange. %", e)
LOG.warning("Problem during declaring exchange. %", e)
return True
elif isinstance(ex, (pika_drv_exc.ConnectionException,
exceptions.MessageDeliveryFailure)):
LOG.warn("Problem during message sending. %s", ex)
LOG.warning("Problem during message sending. %s", ex)
return True
else:
return False
@ -240,7 +240,7 @@ class PikaDriver(base.BaseDriver):
self._declare_rpc_exchange(exchange,
expiration_time - time.time())
except pika_drv_exc.ConnectionException as e:
LOG.warn("Problem during declaring exchange. %", e)
LOG.warning("Problem during declaring exchange. %", e)
raise ex
if reply is not None:
@ -269,7 +269,7 @@ class PikaDriver(base.BaseDriver):
exchange, expiration_time - time.time()
)
except pika_drv_exc.ConnectionException as e:
LOG.warn("Problem during declaring exchange. %", e)
LOG.warning("Problem during declaring exchange. %", e)
def _declare_notification_queue_binding(self, target, timeout=None):
if timeout is not None and timeout < 0:
@ -303,16 +303,16 @@ class PikaDriver(base.BaseDriver):
def on_exception(ex):
if isinstance(ex, (pika_drv_exc.ExchangeNotFoundException,
pika_drv_exc.RoutingException)):
LOG.warn("Problem during sending notification. %", ex)
LOG.warning("Problem during sending notification. %", ex)
try:
self._declare_notification_queue_binding(target)
except pika_drv_exc.ConnectionException as e:
LOG.warn("Problem during declaring notification queue "
"binding. %", e)
LOG.warning("Problem during declaring notification queue "
"binding. %", e)
return True
elif isinstance(ex, (pika_drv_exc.ConnectionException,
pika_drv_exc.MessageRejectedException)):
LOG.warn("Problem during sending notification. %", ex)
LOG.warning("Problem during sending notification. %", ex)
return True
else:
return False

View File

@ -270,9 +270,9 @@ class PikaEngine(object):
pika_next_connection_num, for_listening
)
except pika_pool.Connection.connectivity_errors as e:
LOG.warn("Can't establish connection to host. %s", e)
LOG.warning("Can't establish connection to host. %s", e)
except pika_drv_exc.HostConnectionNotAllowedException as e:
LOG.warn("Connection to host is not allowed. %s", e)
LOG.warning("Connection to host is not allowed. %s", e)
connection_attempts -= 1
pika_next_connection_num += 1
@ -292,7 +292,7 @@ class PikaEngine(object):
int(self._tcp_user_timeout * 1000)
)
except socket.error:
LOG.warn(
LOG.warning(
"Whoops, this kernel doesn't seem to support TCP_USER_TIMEOUT."
)

View File

@ -195,7 +195,7 @@ class RpcPikaIncomingMessage(PikaIncomingMessage, base.RpcIncomingMessage):
def on_exception(ex):
if isinstance(ex, pika_drv_exc.ConnectionException):
LOG.warn(
LOG.warning(
"Connectivity related problem during reply sending. %s",
ex
)
@ -276,7 +276,7 @@ class RpcReplyPikaIncomingMessage(PikaIncomingMessage):
res_exc = ex_type(module_name, class_name, message, trace)
except ImportError as e:
LOG.warn(
LOG.warning(
"Can not deserialize remote exception [module:%s, "
"class:%s]. %s", module_name, class_name, e
)