diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-06-11 16:04:59 +0200 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-06-14 11:50:56 +0000 |
commit | 0756f04b60185a504b07063e8e1b6e2743bb2835 (patch) | |
tree | bd70bc1f588ca9d1c195420b2af1fa9ac8fb8629 /ironic_python_agent | |
parent | bfa97cbbc2040d56bd0db14d1e1b83bb14f1a74c (diff) | |
download | ironic-python-agent-0756f04b60185a504b07063e8e1b6e2743bb2835.tar.gz |
Reduce logging verbosity when collecting logs
It's not uncommon that some commands fail when collecting logs.
We already log all failures in utils.execute, no need to duplicate
them with a non-fatal ERROR logging.
Change-Id: If151b3a3be979bd2b3ce01030e5d6242ad74eaa3
(cherry picked from commit 2fcf35e56d578d98d77ffc97b6441f83548d7704)
Diffstat (limited to 'ironic_python_agent')
-rw-r--r-- | ironic_python_agent/utils.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py index 03de236c..b5d0533a 100644 --- a/ironic_python_agent/utils.py +++ b/ironic_python_agent/utils.py @@ -478,7 +478,6 @@ def get_command_output(command): except (processutils.ProcessExecutionError, OSError) as e: error_msg = ('Failed to get the output of the command "%(command)s". ' 'Error: %(error)s' % {'command': command, 'error': e}) - LOG.error(error_msg) raise errors.CommandExecutionError(error_msg) return io.BytesIO(out) @@ -547,7 +546,7 @@ def collect_system_logs(journald_max_lines=None): try: io_dict[file_name] = get_command_output(command) except errors.CommandExecutionError: - pass + LOG.debug('Collecting logs from command %s has failed', command) io_dict = {} file_list = [] |