Documentation
¶
Index ¶
- func ContextLoggerWithFields(ctx context.Context, fields ...string) context.Context
- func GetLoggerWithFields(ctx context.Context, fields ...string) *logrus.Entry
- func LoggerOf(ctx context.Context) *logrus.Entry
- func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context
- func WithTraceId(ctx context.Context, record slog.Record) (slog.Record, bool, error)
- func Wrap(handler slog.Handler, middleware Middleware) slog.Handler
- type FieldError
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextLoggerWithFields ¶ added in v2.2.78
func GetLoggerWithFields ¶ added in v2.2.78
func WithLogger ¶
WithLogger stores the entry into the context so it can be retrieved with LoggerOf later.
func WithTraceId ¶ added in v2.3.0
Types ¶
type FieldError ¶ added in v2.4.14
func ErrorWithFields ¶ added in v2.4.15
func ErrorWithFields(err error, fields logrus.Fields) *FieldError
func (*FieldError) Error ¶ added in v2.4.14
func (e *FieldError) Error() string
func (*FieldError) Unwrap ¶ added in v2.4.14
func (e *FieldError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.