Added inspec parallel logs in log file in case of warn/errors

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
Nikita Mathur 2022-08-09 18:13:41 +05:30
parent 1c6bfa8f24
commit b9750c0faf

View file

@ -153,6 +153,12 @@ module InspecPlugins
if update_line =~ /EOF_MARKER/
pipe_ready_for_reading.close
break
elsif update_line =~ /WARN/ || update_line =~ /ERROR/
create_logs(
pid,
"#{Time.now.iso8601} Extra log: #{update_line}\n"
)
break
end
update_ui_with_line(pid, update_line) unless run_in_background
# Only pull one line if we are doing normal updates; slurp the whole file