Skip to content

Commit

Permalink
fix mr error
Browse files Browse the repository at this point in the history
  • Loading branch information
glebnaz committed Nov 28, 2023
1 parent c496a08 commit 4e7b4a5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (b *grpcServerRunner) actor() (func() error, func(error)) {

select {
case <-time.After(b.gracefulShutdownTimeout):
log.Error().Err(errors.Wrap(context.DeadlineExceeded, "grpc server graceful stop timed out"))
log.Error().Err(errors.Wrap(context.DeadlineExceeded, "grpc server graceful stop timed out")).Msg("stop server by timeout")
b.server.Stop()
log.Info().Msg("grpc server stopped (force)")
case <-doneCh:
Expand Down
14 changes: 12 additions & 2 deletions example/logger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ import (
)

func main() {
log.InitLog(os.Stdout, false)
log.InitLog(os.Stdout, true)

zlog.Debug().Msg("sds")
zlog.Debug().Msg("MSG")
}

//func main() {
// log.InitLog(os.Stdout, true)
//
// zlog.Debug().Msg("MSG")
//}

// OUTPUT
// {"level":"info","t":"2023-11-28T21:32:59+01:00","msg":"Inited prod version logger"}
// {"level":"debug","t":"2023-11-28T21:32:59+01:00","msg":"MSG"}
2 changes: 1 addition & 1 deletion example/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func main() {
}
},
func(error) {
log.Error().Msgf("Actor failed")
log.Error().Msg("Actor failed")
})

m, err := mongo.NewMongo(s.GetCTX(), "mongodb://localhost:27017")
Expand Down

0 comments on commit 4e7b4a5

Please sign in to comment.