-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened:
context value 丢啦
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
ctx := context.Background()
ctx = middleware.NewLoggingContext(ctx, logger)
srv := server.New(logger, p, bind, timeout, idleTimeout)
app := kratos.New(
kratos.Name(bc.Name),
kratos.Context(ctx), // 后面会拿不到ctx里面的logger
kratos.Server(srv),
)
if err := app.Run(); err != nil {
log.Errorf("failed to run servers: %v", err)
}
Anything else we need to know?:
2.2.0 正常
发现是这里修改了的问题 #1873
Environment:
- Kratos version (use
kratos -v
): 2.2.1 - Go version (use
go version
): - OS (e.g:
cat /etc/os-release
): - Others:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working