Skip to content

Commit 7fe0de9

Browse files
hubatishcopybara-github
authored andcommitted
Remove 2 newlines from redacted output
PiperOrigin-RevId: 904647558
1 parent 2eeb646 commit 7fe0de9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

perfkitbenchmarker/vm_util.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,15 +590,15 @@ def _KillProcess():
590590
if should_time:
591591
timing_output = tf_timing.read().rstrip('\n')
592592

593-
logged_stdout = '[REDACTED]' if suppress_logging else stdout
594-
logged_stderr = '[REDACTED]' if suppress_logging else stderr
595-
debug_text = 'Ran: {%s}\nReturnCode:%s%s\nSTDOUT: %s\nSTDERR: %s' % (
593+
debug_text = 'Ran: {%s}\nReturnCode:%s%s' % (
596594
full_cmd,
597595
process.returncode,
598596
timing_output,
599-
logged_stdout,
600-
logged_stderr,
601597
)
598+
if not suppress_logging:
599+
debug_text += f'\nSTDOUT: {stdout}\nSTDERR: {stderr}'
600+
else:
601+
debug_text += ' STDOUT & STDERR: [REDACTED]'
602602
if _VM_COMMAND_LOG_MODE.value == VmCommandLogMode.ALWAYS_LOG or (
603603
_VM_COMMAND_LOG_MODE.value == VmCommandLogMode.LOG_ON_ERROR
604604
and process.returncode

0 commit comments

Comments
 (0)