Skip to content

Commit

Permalink
Log the full stats and send to stderr instead of stdout (grafana#1808)
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Welch <[email protected]>
  • Loading branch information
slim-bean authored Mar 17, 2020
1 parent 1eb139c commit 3abee78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/logcli/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ func (k kvLogger) Log(keyvals ...interface{}) error {
}

func (q *Query) printStats(stats stats.Result) {
writer := tabwriter.NewWriter(os.Stdout, 0, 8, 0, '\t', 0)
stats.Summary.Log(kvLogger{Writer: writer})
writer := tabwriter.NewWriter(os.Stderr, 0, 8, 0, '\t', 0)
stats.Log(kvLogger{Writer: writer})
}

func (q *Query) resultsDirection() logproto.Direction {
Expand Down

0 comments on commit 3abee78

Please sign in to comment.