Remove extra empty lines from vault.log - Debug command (#16714)
* debug empty lines in vault.log * minor grammar fix * add changelog * add fmt changes
This commit is contained in:
parent
54444b9d2e
commit
ba15b1f822
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
debug: Remove extra empty lines from vault.log when debug command is run
|
||||
```
|
|
@ -1080,6 +1080,7 @@ func (c *DebugCommand) writeLogs(ctx context.Context) {
|
|||
for {
|
||||
select {
|
||||
case log := <-logCh:
|
||||
if len(log) > 0 {
|
||||
if !strings.HasSuffix(log, "\n") {
|
||||
log += "\n"
|
||||
}
|
||||
|
@ -1088,6 +1089,7 @@ func (c *DebugCommand) writeLogs(ctx context.Context) {
|
|||
c.captureError("log", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ default, this is text.
|
|||
- `log_level` `(string: "info")` – Specifies the log level to use when streaming logs. This defaults to `info`
|
||||
if not specified.
|
||||
|
||||
- `log_format` `(string: "standard")` – Specifies the log format to emit when streaming logs. Supported values are "standard" and "json". The default is `standard`.
|
||||
- `log_format` `(string: "standard")` – Specifies the log format to emit when streaming logs. Supported values are "standard" and "json". The default is `standard`,
|
||||
if not specified.
|
||||
|
||||
### Sample Request
|
||||
|
|
Loading…
Reference in New Issue