From c82bd739d03adb1e5965058df40bb4a521c92446 Mon Sep 17 00:00:00 2001 From: Matthew McGill <mhollismcgill@gmail.com> Date: Mon, 12 Nov 2018 17:03:30 +0000 Subject: [PATCH] Fully supports logging Former-commit-id: c1d9b7366f659fed03d8625b6fef98ee2d389215 --- tools/ps_analyze.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/ps_analyze.sh b/tools/ps_analyze.sh index a9ba3406f..433a8c983 100755 --- a/tools/ps_analyze.sh +++ b/tools/ps_analyze.sh @@ -613,16 +613,13 @@ perform_step() eval $command 2>&1 | tee $logfile command_exit=${PIPESTATUS[0]} # this funkiness gets the exit code of $command, not tee elif [[ ! -z "$VERBOSE" && $using_thanos -ne 0 ]]; then - eval $command 2>&1 # thanos.exe handles logging - command_exit=$? - # display each logfile + eval $command > $logfile 2>&1 + # display logs to stdout for this_step in $step do cat logs/$this_step.log done - elif [[ $using_thanos -ne 0 ]]; then - eval $command > "logs/fill_in_cfg.log" 2>&1 # thanos.exe handles logging - command_exit=$? + cat $logfile else eval $command > $logfile 2>&1 command_exit=$? -- GitLab