Documentation
¶
Index ¶
- func AnyField(key string, val interface{}) zap.Field
- func BoolField(key string, val bool) zap.Field
- func ContextWithLogger(ctx context.Context, l *zap.Logger) context.Context
- func DurationField(key string, val time.Duration) zap.Field
- func ErrorField(err error) zap.Field
- func GetLogger() *zap.Logger
- func Int64Field(key string, val int64) zap.Field
- func IntField(key string, val int) zap.Field
- func L(ctx context.Context) *zap.Logger
- func LoggerFromContext(ctx context.Context) *zap.Logger
- func Middleware(next http.Handler) http.Handler
- func NewLogger() *zap.Logger
- func SetLevel(level string)
- func StringField(key, val string) zap.Field
- func StringsField(key string, val []string) zap.Field
- func WithError(ctx context.Context, err error) *zap.Logger
- func WithField(ctx context.Context, field zap.Field) *zap.Logger
- func WithFields(ctx context.Context, fields ...zap.Field) *zap.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶
ContextWithLogger adds logger to context
func ErrorField ¶
func LoggerFromContext ¶
LoggerFromContext returns logger from context
func StringField ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.