MCPcopy
hub / github.com/caddyserver/caddy / Handle

Method Handle

modules/caddyhttp/logging.go:307–313  ·  view source on GitHub ↗
(ctx context.Context, record slog.Record)

Source from the content-addressed store, hash-verified

305}
306
307func (e *extraFieldsSlogHandler) Handle(ctx context.Context, record slog.Record) error {
308 if elf, ok := ctx.Value(ExtraLogFieldsCtxKey).(*ExtraLogFields); ok {
309 return elf.getSloggerHandler(e).Handle(ctx, record)
310 }
311
312 return e.defaultHandler.Handle(ctx, record)
313}
314
315func (e *extraFieldsSlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
316 return &extraFieldsSlogHandler{

Callers

nothing calls this directly

Calls 3

getSloggerHandlerMethod · 0.80
HandleMethod · 0.65
ValueMethod · 0.45

Tested by

no test coverage detected