MCPcopy
hub / github.com/uber-go/zap / Handler

Struct Handler

exp/zapslog/handler.go:36–49  ·  exp/zapslog/handler.go::Handler

Handler implements the slog.Handler by writing to a zap Core.

Source from the content-addressed store, hash-verified

34
35// Handler implements the slog.Handler by writing to a zap Core.
36type Handler struct {
37 core zapcore.Core
38 name string // logger name
39 addCaller bool
40 addStackAt slog.Level
41 callerSkip int
42
43 // List of unapplied groups.
44 //
45 // These are applied only if we encounter a real field
46 // to avoid creating empty namespaces -- which is disallowed by slog's
47 // usage contract.
48 groups []string
49}
50
51// NewHandler builds a [Handler] that writes to the supplied [zapcore.Core]
52// with options.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected