Fix logging levels

This is a fixup patch for bde6ed5570,
and should follow the OpenStack Logging Standards.

Change-Id: Ie277c5742ab736f4c5cee1ee1badedf055323515
This commit is contained in:
Josh Gachnang
2015-08-04 09:29:44 -07:00
parent 74bd6142be
commit 50875381d8
2 changed files with 8 additions and 8 deletions

View File

@@ -162,8 +162,8 @@ class AsyncCommandResult(BaseCommandResult):
self.command_error = e self.command_error = e
self.command_status = AgentCommandStatus.CLEAN_VERSION_MISMATCH self.command_status = AgentCommandStatus.CLEAN_VERSION_MISMATCH
self.command_result = None self.command_result = None
LOG.info('Clean version mismatch for command %s', LOG.error('Clean version mismatch for command %s',
self.command_name) self.command_name)
except Exception as e: except Exception as e:
LOG.exception('Command failed: %(name)s, error: %(err)s', LOG.exception('Command failed: %(name)s, error: %(err)s',
{'name': self.command_name, 'err': e}) {'name': self.command_name, 'err': e})
@@ -227,16 +227,16 @@ class ExecuteCommandMixin(object):
def execute_command(self, command_name, **kwargs): def execute_command(self, command_name, **kwargs):
"""Execute an agent command.""" """Execute an agent command."""
with self.command_lock: with self.command_lock:
LOG.info('Executing command: %(name)s with args: %(args)s', LOG.debug('Executing command: %(name)s with args: %(args)s',
{'name': command_name, 'args': kwargs}) {'name': command_name, 'args': kwargs})
extension_part, command_part = self.split_command(command_name) extension_part, command_part = self.split_command(command_name)
if len(self.command_results) > 0: if len(self.command_results) > 0:
last_command = list(self.command_results.values())[-1] last_command = list(self.command_results.values())[-1]
if not last_command.is_done(): if not last_command.is_done():
LOG.info('Tried to execute %(command)s, agent is still ' LOG.error('Tried to execute %(command)s, agent is still '
'executing %(last)s', {'command': command_name, 'executing %(last)s', {'command': command_name,
'last': last_command}) 'last': last_command})
raise errors.CommandExecutionError('agent is busy') raise errors.CommandExecutionError('agent is busy')
try: try:

View File

@@ -59,7 +59,7 @@ class CleanExtension(base.BaseAgentExtension):
the step returns. the step returns.
""" """
# Ensure the agent is still the same version, or raise an exception # Ensure the agent is still the same version, or raise an exception
LOG.info('Executing clean step %s', step) LOG.debug('Executing clean step %s', step)
_check_clean_version(clean_version) _check_clean_version(clean_version)
if 'step' not in step: if 'step' not in step: