WithGroup returns a new BatchHandler that starts a group. All logger attributes will be resolved under the specified group name.
(name string)
| 98 | // |
| 99 | // All logger attributes will be resolved under the specified group name. |
| 100 | func (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. |
| 114 | func (h *BatchHandler) WithAttrs(attrs []slog.Attr) slog.Handler { |
no outgoing calls