fix server logging (#1417)

This commit is contained in:
Asim Aslam 2020-03-26 13:08:06 +00:00 committed by GitHub
parent 02839cfba5
commit 7182ca1fd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -830,7 +830,7 @@ func (g *grpcServer) Start() error {
// announce self to the world // announce self to the world
if err := g.Register(); err != nil { if err := g.Register(); err != nil {
if logger.V(logger.ErrorLevel, logger.DefaultLogger) { if logger.V(logger.ErrorLevel, logger.DefaultLogger) {
logger.Errorf("Server register error: ", err) logger.Errorf("Server register error: %v", err)
} }
} }
@ -838,7 +838,7 @@ func (g *grpcServer) Start() error {
go func() { go func() {
if err := g.srv.Serve(ts); err != nil { if err := g.srv.Serve(ts); err != nil {
if logger.V(logger.ErrorLevel, logger.DefaultLogger) { if logger.V(logger.ErrorLevel, logger.DefaultLogger) {
logger.Errorf("gRPC Server start error: ", err) logger.Errorf("gRPC Server start error: %v", err)
} }
} }
}() }()