logger

package
v0.0.0-...-091137d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*slog.Logger
}

Logger represents the singular of logger.

func NewLogger

func NewLogger(level int) *Logger

NewLogger creates a logger.

func (*Logger) WithTraceID

func (l *Logger) WithTraceID(ctx context.Context) context.Context

WithTraceID returns a context with a trace id.

type TraceIDHandler

type TraceIDHandler struct {
	slog.Handler
}

TraceIDHandler represents the singular of trace id handler.

func (TraceIDHandler) Handle

func (t TraceIDHandler) Handle(ctx context.Context, r slog.Record) error

Handle implements slog.Handler.

Jump to

Keyboard shortcuts

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