Fix vault debug so that captured logs include newlines. (#12175)

This commit is contained in:
Nick Cabatoff
2021-07-27 15:15:24 +02:00
committed by GitHub
parent a83a629ae2
commit a73d639f93
2 changed files with 6 additions and 0 deletions

3
changelog/12175.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
cli: vault debug now puts newlines after every captured log line.
```

View File

@@ -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)