Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 58fb94c

Browse files
authored
Merge pull request #1543 from katarzyna-z/grpc-logs
Fixes #1438, set standard logger as logger for grpc
2 parents 96d9c6a + 6542d89 commit 58fb94c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

snapteld.go

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import (
4747
"github.com/intelsdi-x/snap/mgmt/tribe/agreement"
4848
"github.com/intelsdi-x/snap/pkg/cfgfile"
4949
"github.com/intelsdi-x/snap/scheduler"
50+
"google.golang.org/grpc/grpclog"
5051
)
5152

5253
var (
@@ -287,6 +288,10 @@ func action(ctx *cli.Context) error {
287288

288289
// Switch log level to user defined
289290
log.SetLevel(getLevel(cfg.LogLevel))
291+
292+
//Set standard logger as logger for grpc
293+
grpclog.SetLogger(log.StandardLogger())
294+
290295
log.Info("setting log level to: ", l[cfg.LogLevel])
291296

292297
log.Info("Starting snapteld (version: ", gitversion, ")")

0 commit comments

Comments
 (0)