Documentation
¶
Index ¶
- func AddMapToContext(ctx context.Context, fields map[string]interface{})
- func AddStrToContext(ctx context.Context, key, value string)
- func AddToContext(ctx context.Context, key string, value interface{})
- func GetID(ctx context.Context) string
- func NewContextFrom(ctx context.Context) context.Context
- func NewSubLoggerContext(log zerolog.Logger) context.Context
- func SetID(ctx context.Context, id string) context.Context
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMapToContext ¶
AddMapToContext adds the map of key/values to the log context.
func AddStrToContext ¶
AddStrToContext adds the key/value to the log context.
func AddToContext ¶
AddToContext adds the key/value to the log context.
func NewContextFrom ¶
NewContextFrom clones the current context. Used to branch execution (go routines).
func NewSubLoggerContext ¶
NewSubLoggerContext creates a new logger with an empty context.
Types ¶
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.