Documentation ¶
Index ¶
- func ContextLoggerWithFields(ctx context.Context, fields ...string) context.Context
- func GetLogger(ctx context.Context, object interface{}) *logrus.Entry
- func GetLoggerWithFields(ctx context.Context, fields ...string) *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 Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextLoggerWithFields ¶ added in v2.2.78
func GetLogger ¶
GetLogger returns the current logger with the given prefix or type name from the context.
func GetLoggerWithFields ¶ added in v2.2.78
func WithLogger ¶
WithLogger stores the entry into the context so it can be retrieved with GetLogger later.
func WithTraceId ¶ added in v2.3.0
Types ¶
Click to show internal directories.
Click to hide internal directories.