From a074f61a692fa5a27ad6ebc8526210da498b439d Mon Sep 17 00:00:00 2001 From: Sumanth Chinthagunta Date: Mon, 15 Jun 2020 17:40:06 -0700 Subject: [PATCH] fix(logger): fix printing log level --- service/emailer/main.go | 2 +- shared/logger/logger.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/emailer/main.go b/service/emailer/main.go index f08a6d01..eb4e862a 100644 --- a/service/emailer/main.go +++ b/service/emailer/main.go @@ -77,7 +77,7 @@ func main() { log.Fatal().Msgf("failed to build container: %v", err) } - emailSubscriber := ctn.Resolve("emailer-subscriber") //.(subscriber.EmailSubscriber) + emailSubscriber := ctn.Resolve("emailer-subscriber") //.(*subscriber.EmailSubscriber) // Register Struct as Subscriber micro.RegisterSubscriber(constants.EMAILER_SERVICE, service.Server(), emailSubscriber) diff --git a/shared/logger/logger.go b/shared/logger/logger.go index c9d65412..c61a32f8 100644 --- a/shared/logger/logger.go +++ b/shared/logger/logger.go @@ -147,7 +147,7 @@ func (l *defaultLogger) Init(opts ...Option) error { grpclog.SetLoggerV2(zeroToGrpcAdopter.New(gLogger)) logr.Info(). - Str("LogLevel", l.opts.Level.String()). + Str("LogLevel", logr.GetLevel().String()). Str("LogFormat", string(l.opts.Format)). Msg("Logger set to Zerolog with:")