Documentation
¶
Index ¶
- Variables
- func SetFormatting(format Formatting)
- func SetLevel(level string)
- func WithLogField(ctx context.Context, key, value string) context.Contextdeprecated
- func WithLogFields(ctx context.Context, keyValues ...string) context.Context
- func WithLogFieldsMap(ctx context.Context, fields map[string]string) context.Context
- func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context
- type Formatting
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// L accesses the current logger from the context
L = loggerFromContext
)
Functions ¶
func SetFormatting ¶
func SetFormatting(format Formatting)
func WithLogFields ¶ added in v1.5.10
WithLogFields adds the specified fields to the logger in the context for structured logging. The key-value pairs must be provided in pairs. This is a convenience for readability over `WithLogFieldsMap`
func WithLogFieldsMap ¶ added in v1.5.10
WithLogFieldsMap adds the specified, structured fields to the logger in the context
Types ¶
Click to show internal directories.
Click to hide internal directories.