Skip to content

Commit 535def3

Browse files
author
yfzhao
committed
Remove log translations
Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. Change-Id: I504de69b2e64250740ebcab432042a16f966fdbe Closes-Bug: #1674584
1 parent 6329c04 commit 535def3

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

openstackclient/compute/v2/service.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from osc_lib import utils
2323

2424
from openstackclient.i18n import _
25-
from openstackclient.i18n import _LE
2625

2726

2827
LOG = logging.getLogger(__name__)
@@ -189,7 +188,7 @@ def take_action(self, parsed_args):
189188
cs.disable(parsed_args.host, parsed_args.service)
190189
except Exception:
191190
status = "enabled" if enabled else "disabled"
192-
LOG.error(_LE("Failed to set service status to %s"), status)
191+
LOG.error("Failed to set service status to %s", status)
193192
result += 1
194193

195194
force_down = None
@@ -203,7 +202,7 @@ def take_action(self, parsed_args):
203202
force_down=force_down)
204203
except Exception:
205204
state = "down" if force_down else "up"
206-
LOG.error(_LE("Failed to set service state to %s"), state)
205+
LOG.error("Failed to set service state to %s", state)
207206
result += 1
208207

209208
if result > 0:

openstackclient/i18n.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,3 @@
1919

2020
# The primary translation function using the well-known name "_"
2121
_ = _translators.primary
22-
23-
# Translators for log levels.
24-
#
25-
# The abbreviated names are meant to reflect the usual use of a short
26-
# name like '_'. The "L" is for "log" and the other letter comes from
27-
# the level.
28-
_LI = _translators.log_info
29-
_LW = _translators.log_warning
30-
_LE = _translators.log_error
31-
_LC = _translators.log_critical

0 commit comments

Comments
 (0)