mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
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:
@@ -1080,13 +1080,15 @@ 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)
|
||||
return
|
||||
if len(log) > 0 {
|
||||
if !strings.HasSuffix(log, "\n") {
|
||||
log += "\n"
|
||||
}
|
||||
_, err = out.WriteString(log)
|
||||
if err != nil {
|
||||
c.captureError("log", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
case <-ctx.Done():
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user