Skip to content

Commit

Permalink
Add headers to output when using logs tail
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught committed Apr 12, 2023
1 parent ac090d1 commit a33b11e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/display/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ func (r *Renderer) Stream(data []View, ch <-chan View) {
}
}

if len(data) > 0 {
header := []string{
truncate("TYPE", 23),
truncate("DESCRIPTION", 54),
truncate("DATE", 20),
truncate("CONNECTION", 20),
truncate("CLIENT", 20),
}
displayRow(header)
}

for _, v := range data {
displayView(v)
}
Expand Down

0 comments on commit a33b11e

Please sign in to comment.