diff --git a/trove/common/debug_utils.py b/trove/common/debug_utils.py index ad083627c3..11c94c62e6 100644 --- a/trove/common/debug_utils.py +++ b/trove/common/debug_utils.py @@ -96,8 +96,8 @@ def enabled(): if __debug_state: import threading if threading.current_thread.__module__ == 'eventlet.green.threading': - LOG.warn(_("Enabling debugging with eventlet monkey patched " - "could produce unexpected behavior.")) + LOG.warning(_("Enabling debugging with eventlet monkey" + " patched produce unexpected behavior.")) return __debug_state @@ -117,8 +117,9 @@ def __setup_remote_pydev_debug_safe(pydev_debug_host=None, pydev_debug_port=pydev_debug_port, pydev_path=pydev_path) except Exception as e: - LOG.warn(_("Can't connect to remote debug server. Continuing to " - "work in standard mode. Error: %s."), e) + LOG.warning(_("Can't connect to remote debug server." + " Continuing to work in standard mode." + " Error: %s."), e) return False diff --git a/trove/common/profile.py b/trove/common/profile.py index d59cf8483e..4147fe3968 100644 --- a/trove/common/profile.py +++ b/trove/common/profile.py @@ -36,14 +36,14 @@ def setup_profiler(binary, host): rpc.TRANSPORT, "trove", binary, host) notifier.set(_notifier) web.enable(CONF.profiler.hmac_keys) - LOG.warn(_LW("The OpenStack Profiler is enabled. Using one of the " - "hmac_keys specified in the trove.conf file " - "(typically in /etc/trove), a trace can be made of all " - "requests. Only an admin user can retrieve the trace " - "information, however.\n" - "To disable the profiler, add the following to the " - "configuration file:\n" - "[profiler]\n" - "enabled=false")) + LOG.warning(_LW("The OpenStack Profiler is enabled. Using one" + " of the hmac_keys specified in the trove.conf file " + "(typically in /etc/trove), a trace can be made of " + "all requests. Only an admin user can retrieve " + "the trace information, however.\n" + "To disable the profiler, add the following to the " + "configuration file:\n" + "[profiler]\n" + "enabled=false")) else: web.disable() diff --git a/trove/instance/models.py b/trove/instance/models.py index 50fee79fb4..e09aec3b79 100644 --- a/trove/instance/models.py +++ b/trove/instance/models.py @@ -456,7 +456,7 @@ def load_any_instance(context, id, load_server=True): return load_instance(BuiltInstance, context, id, needs_server=load_server) except exception.UnprocessableEntity: - LOG.warn(_LW("Could not load instance %s."), id) + LOG.warning(_LW("Could not load instance %s."), id) return load_instance(FreshInstance, context, id, needs_server=False) @@ -569,7 +569,7 @@ class BaseInstance(SimpleInstance): if self.slaves: msg = _("Detach replicas before deleting replica source.") - LOG.warn(msg) + LOG.warning(msg) raise exception.ReplicaSourceDeleteForbidden(msg) self.update_db(task_status=InstanceTasks.DELETING,