mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
Fix vault debug so that captured logs include newlines. (#12175)
This commit is contained in:
parent
a83a629ae2
commit
a73d639f93
2 changed files with 6 additions and 0 deletions
3
changelog/12175.txt
Normal file
3
changelog/12175.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
cli: vault debug now puts newlines after every captured log line.
|
||||
```
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue