fix(logger): Move extrafields from gelf to global system
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -8,10 +8,10 @@ import (
|
||||
|
||||
const LoggerKey = "mainLogger"
|
||||
|
||||
func AddMainLogger(ctx context.Context, logger *logrus.Logger) context.Context {
|
||||
func AddMainLogger(ctx context.Context, logger *logrus.Entry) context.Context {
|
||||
return context.WithValue(ctx, LoggerKey, logger)
|
||||
}
|
||||
|
||||
func GetLogger(ctx context.Context) *logrus.Logger {
|
||||
return ctx.Value(LoggerKey).(*logrus.Logger)
|
||||
func GetLogger(ctx context.Context) *logrus.Entry {
|
||||
return ctx.Value(LoggerKey).(*logrus.Entry)
|
||||
}
|
||||
|
Reference in New Issue
Block a user