MCPcopy
hub / github.com/pocketbase/pocketbase / WithGroup

Method WithGroup

tools/logger/batch_handler.go:100–111  ·  view source on GitHub ↗

WithGroup returns a new BatchHandler that starts a group. All logger attributes will be resolved under the specified group name.

(name string)

Source from the content-addressed store, hash-verified

98//
99// All logger attributes will be resolved under the specified group name.
100func (h *BatchHandler) WithGroup(name string) slog.Handler {
101 if name == "" {
102 return h
103 }
104
105 return &BatchHandler{
106 parent: h,
107 mux: h.mux,
108 options: h.options,
109 group: name,
110 }
111}
112
113// WithAttrs returns a new BatchHandler loaded with the specified attributes.
114func (h *BatchHandler) WithAttrs(attrs []slog.Attr) slog.Handler {

Calls

no outgoing calls

Tested by 2