Documentation
¶
Overview ¶
Package logging provides a wrapper around Zerolog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFieldFilterWriter ¶
NewFieldFilterWriter creates a new writer that filters out specified fields
Types ¶
type Attr ¶
Attr is a custom type to enable dynamic passing of function overloads on the logger to enable for a dynamic list of zerolog attributes onto a logger.
type LoggerOpt ¶
type LoggerOpt = func(logger *internalLogger) error
func WithAttrs ¶
WithAttrs adds a list of attributes to add to the logger.
Example:
logger := NewLogger(
WithAttrs(
func(ctx zerolog.Context) zerolog.Context {
return ctx.Str("app", "my-application").Int("version", 1)
},
),
)
func WithVersion ¶
WithVersion overrides the default version fetched from the `build` library
Click to show internal directories.
Click to hide internal directories.