Skip to content

Commit

Permalink
Merge #49187
Browse files Browse the repository at this point in the history
49187: storage: quiet Pebble logging in tests r=petermattis a=petermattis

Change Pebble's logging to match the behavior of RocksDB's logging for
tests: the Pebble INFO logs are now only to the main log at `--v=3` and
above. Previously the Pebble INFO logs were always being output if
`InitPebbleLogger` had not been called, which is the case for almost all
tests.

Release note: None

Co-authored-by: Peter Mattis <[email protected]>
  • Loading branch information
craig[bot] and petermattis committed May 18, 2020
2 parents a0f5c15 + a3fdecc commit 9623e65
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/storage/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,12 @@ type pebbleLogger struct {
func (l pebbleLogger) Infof(format string, args ...interface{}) {
if pebbleLog != nil {
pebbleLog.LogfDepth(l.ctx, l.depth, format, args...)
// Only log INFO logs to the normal CockroachDB log at --v=3 and above.
if !log.V(3) {
return
}
return
}
// Only log INFO logs to the normal CockroachDB log at --v=3 and above.
if log.V(3) {
log.InfofDepth(l.ctx, l.depth, format, args...)
}
log.InfofDepth(l.ctx, l.depth, format, args...)
}

func (l pebbleLogger) Fatalf(format string, args ...interface{}) {
Expand Down

0 comments on commit 9623e65

Please sign in to comment.