Documentation ¶
Index ¶
- Variables
- func Configure(opts Options)
- func Handler(logger *slog.Logger, optSkipPaths ...[]string) func(next http.Handler) http.Handler
- func LogEntry(ctx context.Context) *slog.Logger
- func LogEntrySetField(ctx context.Context, key, value string)
- func LogEntrySetFields(ctx context.Context, fields map[string]interface{})
- func NewLogger(serviceName string, opts ...Options) *slog.Logger
- func RequestLogger(logger *slog.Logger, skipPaths ...[]string) func(next http.Handler) http.Handler
- type Options
- type RequestLoggerEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ LogLevel: "info", LevelFieldName: "level", Concise: false, Tags: nil, SkipHeaders: nil, TimeFieldFormat: time.RFC3339Nano, TimeFieldName: "timestamp", }
Functions ¶
func LogEntrySetField ¶
func LogEntrySetFields ¶
Types ¶
type RequestLoggerEntry ¶
func (*RequestLoggerEntry) Panic ¶
func (l *RequestLoggerEntry) Panic(v interface{}, stack []byte)
Click to show internal directories.
Click to hide internal directories.