Skip to content

Commit b96b72e

Browse files
committed
log: downgrade gRPC logger level
1 parent 85ed9d1 commit b96b72e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

log.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,22 @@ func NewGrpcLogLogger(root *build.RotatingLogWriter,
8585
}
8686

8787
// GrpcLogLogger is a wrapper around a btclog logger to make it compatible with
88-
// the grpclog logger package.
88+
// the grpclog logger package. By default we downgrade the info level to debug
89+
// to reduce the verbosity of the logger.
8990
type GrpcLogLogger struct {
9091
btclog.Logger
9192
}
9293

94+
func (l GrpcLogLogger) Info(args ...interface{}) {
95+
l.Logger.Debug(args...)
96+
}
97+
9398
func (l GrpcLogLogger) Infoln(args ...interface{}) {
94-
l.Logger.Error(args...)
99+
l.Logger.Debug(args...)
100+
}
101+
102+
func (l GrpcLogLogger) Infof(format string, args ...interface{}) {
103+
l.Logger.Debugf(format, args...)
95104
}
96105

97106
func (l GrpcLogLogger) Warning(args ...interface{}) {

0 commit comments

Comments
 (0)