diff options
| author | Gábor Antal <antal@inf.u-szeged.hu> | 2017-02-07 17:54:11 +0100 |
|---|---|---|
| committer | jiansong <jian.song@easystack.cn> | 2017-03-08 10:00:34 -0800 |
| commit | ccceffa7f56bfcc2ff42f98a6272ace866993d09 (patch) | |
| tree | 882ec2c0a2410f1f44bda4c62fc14b0726a0b666 /troveclient/shell.py | |
| parent | 4139774157f960c9ce8786b980473853d6bb7815 (diff) | |
| download | python-troveclient-ccceffa7f56bfcc2ff42f98a6272ace866993d09.tar.gz | |
Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.
Also, upgraded hacking requirement, to enable H904 check.
[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Co-Authored-By: jiansong <jian.song@easystack.cn>
Change-Id: I3f020b6bcb1b9bf6d18a3b4f738c13cccd1bbff8
Closes-Bug: #1596829
Diffstat (limited to 'troveclient/shell.py')
| -rw-r--r-- | troveclient/shell.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/troveclient/shell.py b/troveclient/shell.py index 0466f37..29c9228 100644 --- a/troveclient/shell.py +++ b/troveclient/shell.py @@ -51,7 +51,7 @@ DEFAULT_OS_DATABASE_API_VERSION = "1.0" DEFAULT_TROVE_ENDPOINT_TYPE = 'publicURL' DEFAULT_TROVE_SERVICE_TYPE = 'database' -logger = logging.getLogger(__name__) +LOG = logging.getLogger(__name__) osprofiler_profiler = importutils.try_import("osprofiler.profiler") @@ -751,7 +751,7 @@ def main(): print(_("... terminating trove client"), file=sys.stderr) sys.exit(130) except Exception as e: - logger.debug(e, exc_info=1) + LOG.debug(e, exc_info=1) message = six.text_type(e) if not isinstance(message, six.string_types): message = str(message) |
