From 258c1102cc6b93a860bcd7cc083d4e14ae0025ce Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sun, 10 Jan 2016 21:54:53 +0900 Subject: log take_action parameters in a single place Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be --- openstackclient/common/configuration.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'openstackclient/common/configuration.py') diff --git a/openstackclient/common/configuration.py b/openstackclient/common/configuration.py index ac2792dd..a70e4d14 100644 --- a/openstackclient/common/configuration.py +++ b/openstackclient/common/configuration.py @@ -13,21 +13,16 @@ """Configuration action implementations""" -import logging - -from cliff import show import six -from openstackclient.common import utils +from openstackclient.common import command REDACTED = "" -class ShowConfiguration(show.ShowOne): +class ShowConfiguration(command.ShowOne): """Display configuration details""" - log = logging.getLogger(__name__ + '.ShowConfiguration') - def get_parser(self, prog_name): parser = super(ShowConfiguration, self).get_parser(prog_name) mask_group = parser.add_mutually_exclusive_group() @@ -46,7 +41,6 @@ class ShowConfiguration(show.ShowOne): ) return parser - @utils.log_method(log) def take_action(self, parsed_args): info = self.app.client_manager.get_configuration() -- cgit v1.2.1