Merge "Reduce logging verbosity when collecting logs" into stable/train
This commit is contained in:
commit
f0204fe33a
|
@ -351,7 +351,6 @@ def get_command_output(command):
|
||||||
except (processutils.ProcessExecutionError, OSError) as e:
|
except (processutils.ProcessExecutionError, OSError) as e:
|
||||||
error_msg = ('Failed to get the output of the command "%(command)s". '
|
error_msg = ('Failed to get the output of the command "%(command)s". '
|
||||||
'Error: %(error)s' % {'command': command, 'error': e})
|
'Error: %(error)s' % {'command': command, 'error': e})
|
||||||
LOG.error(error_msg)
|
|
||||||
raise errors.CommandExecutionError(error_msg)
|
raise errors.CommandExecutionError(error_msg)
|
||||||
return io.BytesIO(out)
|
return io.BytesIO(out)
|
||||||
|
|
||||||
|
@ -419,7 +418,7 @@ def collect_system_logs(journald_max_lines=None):
|
||||||
try:
|
try:
|
||||||
io_dict[file_name] = get_command_output(command)
|
io_dict[file_name] = get_command_output(command)
|
||||||
except errors.CommandExecutionError:
|
except errors.CommandExecutionError:
|
||||||
pass
|
LOG.debug('Collecting logs from command %s has failed', command)
|
||||||
|
|
||||||
io_dict = {}
|
io_dict = {}
|
||||||
file_list = []
|
file_list = []
|
||||||
|
|
Loading…
Reference in New Issue