startup_logrus

package
v2.4.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextLoggerWithFields added in v2.2.78

func ContextLoggerWithFields(ctx context.Context, fields ...string) context.Context

func GetLoggerWithFields added in v2.2.78

func GetLoggerWithFields(ctx context.Context, fields ...string) *logrus.Entry

func LoggerOf added in v2.3.49

func LoggerOf(ctx context.Context) *logrus.Entry

func WithLogger

func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context

WithLogger stores the entry into the context so it can be retrieved with LoggerOf later.

func WithTraceId added in v2.3.0

func WithTraceId(ctx context.Context, record slog.Record) (slog.Record, bool, error)

func Wrap added in v2.3.0

func Wrap(handler slog.Handler, middleware Middleware) slog.Handler

Types

type FieldError added in v2.4.14

type FieldError struct {
	Err    error
	Fields logrus.Fields
}

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

type Middleware added in v2.3.0

type Middleware func(context.Context, slog.Record) (slog.Record, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL