Skip to content

Commit

Permalink
Merge pull request #9 from plainq/fix_nil_logger_in_grpc
Browse files Browse the repository at this point in the history
Fix nil pointer logger in grpc
  • Loading branch information
heartwilltell authored Sep 11, 2024
2 parents a77e550 + 994c6af commit b30d8bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grpckit/grpc_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/plainq/servekit"
"github.com/plainq/servekit/logkit"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"
)
Expand Down Expand Up @@ -174,6 +175,7 @@ func (l *ListenerGRPC) handleShutdown(ctx context.Context) error {

func applyOptionsGRPC(options ...Option[ListenerConfig]) ListenerConfig {
cfg := ListenerConfig{
logger: logkit.New(logkit.WithLevel(slog.LevelInfo)),
unaryInterceptors: make([]UnaryInterceptor, 0),
streamInterceptors: make([]StreamInterceptor, 0),
}
Expand Down

0 comments on commit b30d8bb

Please sign in to comment.