From 47a843ee19928fe74700e64dc09ee2a4b6050848 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Tue, 27 Jul 2021 07:42:53 -0400 Subject: [PATCH 1/2] Fix `vault debug` so that captured logs include newlines. --- command/debug.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/debug.go b/command/debug.go index f09214adf6923..afd4471d0f74a 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) From 5381596d6f4b7a1f92700dcde2ebec46624f2a7d Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Tue, 27 Jul 2021 07:44:38 -0400 Subject: [PATCH 2/2] Add CL. --- changelog/12175.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/12175.txt diff --git a/changelog/12175.txt b/changelog/12175.txt new file mode 100644 index 0000000000000..a75b21cabd4ab --- /dev/null +++ b/changelog/12175.txt @@ -0,0 +1,3 @@ +```release-note:bug +cli: vault debug now puts newlines after every captured log line. +```