summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_middleware/_i18n.py10
-rw-r--r--oslo_middleware/catch_errors.py5
-rw-r--r--oslo_middleware/healthcheck/disable_by_file.py11
3 files changed, 7 insertions, 19 deletions
diff --git a/oslo_middleware/_i18n.py b/oslo_middleware/_i18n.py
index f9bbda1..250ed62 100644
--- a/oslo_middleware/_i18n.py
+++ b/oslo_middleware/_i18n.py
@@ -23,13 +23,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='oslo_middleware')
# The primary translation function using the well-known name "_"
_ = _translators.primary
-
-# Translators for log levels.
-#
-# The abbreviated names are meant to reflect the usual use of a short
-# name like '_'. The "L" is for "log" and the other letter comes from
-# the level.
-_LI = _translators.log_info
-_LW = _translators.log_warning
-_LE = _translators.log_error
-_LC = _translators.log_critical
diff --git a/oslo_middleware/catch_errors.py b/oslo_middleware/catch_errors.py
index 8ffd252..220d704 100644
--- a/oslo_middleware/catch_errors.py
+++ b/oslo_middleware/catch_errors.py
@@ -19,7 +19,6 @@ import re
import webob.dec
import webob.exc
-from oslo_middleware._i18n import _LE
from oslo_middleware import base
@@ -41,7 +40,7 @@ class CatchErrors(base.ConfigurableMiddleware):
response = req.get_response(self.application)
except Exception:
req_str = _TOKEN_RE.sub(r'\1: *****', req.as_text())
- LOG.exception(_LE('An error occurred during '
- 'processing the request: %s'), req_str)
+ LOG.exception('An error occurred during '
+ 'processing the request: %s', req_str)
response = webob.exc.HTTPInternalServerError()
return response
diff --git a/oslo_middleware/healthcheck/disable_by_file.py b/oslo_middleware/healthcheck/disable_by_file.py
index c1eafa8..cc99c08 100644
--- a/oslo_middleware/healthcheck/disable_by_file.py
+++ b/oslo_middleware/healthcheck/disable_by_file.py
@@ -16,7 +16,6 @@
import logging
import os
-from oslo_middleware._i18n import _LW
from oslo_middleware.healthcheck import opts
from oslo_middleware.healthcheck import pluginbase
@@ -66,9 +65,9 @@ class DisableByFilesPortsHealthcheck(pluginbase.HealthcheckBaseExtension):
def healthcheck(self, server_port):
path = self.status_files.get(server_port)
if not path:
- LOG.warning(_LW('DisableByFilesPorts healthcheck middleware'
- ' enabled without disable_by_file_paths set'
- ' for port %s') % server_port)
+ LOG.warning('DisableByFilesPorts healthcheck middleware'
+ ' enabled without disable_by_file_paths set'
+ ' for port %s', server_port)
return pluginbase.HealthcheckResult(available=True,
reason="OK")
else:
@@ -107,8 +106,8 @@ class DisableByFileHealthcheck(pluginbase.HealthcheckBaseExtension):
def healthcheck(self, server_port):
path = self._conf_get('disable_by_file_path')
if not path:
- LOG.warning(_LW('DisableByFile healthcheck middleware enabled '
- 'without disable_by_file_path set'))
+ LOG.warning('DisableByFile healthcheck middleware enabled '
+ 'without disable_by_file_path set')
return pluginbase.HealthcheckResult(
available=True, reason="OK",
details="No 'disable_by_file_path' configuration value"