Fix `vault debug` so that captured logs include newlines. (#12175)
This commit is contained in:
parent
03b2208f04
commit
6016e86115
|
@ -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 {
|
for {
|
||||||
select {
|
select {
|
||||||
case log := <-logCh:
|
case log := <-logCh:
|
||||||
|
if !strings.HasSuffix(log, "\n") {
|
||||||
|
log += "\n"
|
||||||
|
}
|
||||||
_, err = out.WriteString(log)
|
_, err = out.WriteString(log)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.captureError("log", err)
|
c.captureError("log", err)
|
||||||
|
|
Loading…
Reference in New Issue