From 6016e86115414c4defdfc9cc48bb345eec5e7c3e Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Tue, 27 Jul 2021 15:15:24 +0200 Subject: [PATCH] Fix `vault debug` so that captured logs include newlines. (#12175) --- changelog/12175.txt | 3 +++ command/debug.go | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 changelog/12175.txt diff --git a/changelog/12175.txt b/changelog/12175.txt new file mode 100644 index 000000000..a75b21cab --- /dev/null +++ b/changelog/12175.txt @@ -0,0 +1,3 @@ +```release-note:bug +cli: vault debug now puts newlines after every captured log line. +``` diff --git a/command/debug.go b/command/debug.go index f09214adf..afd4471d0 100644 --- a/command/debug.go +++ b/command/debug.go @@ -1000,6 +1000,9 @@ func (c *DebugCommand) writeLogs(ctx context.Context) { for { select { case log := <-logCh: + if !strings.HasSuffix(log, "\n") { + log += "\n" + } _, err = out.WriteString(log) if err != nil { c.captureError("log", err)