Documentation
¶
Overview ¶
package logger is a package that provides a structured logger that's context.Context aware.
Index ¶
- Variables
- func Crit(ctx context.Context, msg string, pairs ...interface{})
- func Debug(ctx context.Context, msg string, pairs ...interface{})
- func Error(ctx context.Context, msg string, pairs ...interface{})
- func Info(ctx context.Context, msg string, pairs ...interface{})
- func InfoContext(ctx context.Context, msg string, keys ...string)
- func Warn(ctx context.Context, msg string, pairs ...interface{})
- func WithLogger(ctx context.Context, l Logger) context.Context
- type Logger
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, pairs ...interface{}) Info(msg string, pairs ...interface{}) Warn(msg string, pairs ...interface{}) Error(msg string, pairs ...interface{}) Crit(msg string, pairs ...interface{}) }
Logger represents a structured leveled logger.
func FromContext ¶
FromContext returns a log.Logger from the context.
Click to show internal directories.
Click to hide internal directories.