Documentation
¶
Index ¶
- Variables
- func IntoContext(ctx context.Context, logger Logger) context.Context
- type Logger
- func (l Logger) Enabled() bool
- func (l Logger) Error(err error, msg string, keysAndValues ...any)
- func (l Logger) Info(msg string, keysAndValues ...any)
- func (l Logger) WithCallDepth(depth int) Logger
- func (l Logger) WithFields(keysAndValues ...any) Logger
- func (l Logger) WithName(name string) Logger
- func (l Logger) WithVerbosity(level int) Logger
- type Opt
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("logger not found")
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (Logger) WithCallDepth ¶
func (Logger) WithFields ¶
func (Logger) WithVerbosity ¶
type Opt ¶
type Opt func(opt *Option)
func WithCaller ¶
func WithCaller() Opt
func WithFields ¶ added in v2.1.0
func WithTimestamp ¶
func WithTimestamp() Opt
func WithWriters ¶ added in v2.1.0
Click to show internal directories.
Click to hide internal directories.