Handle implements [slog.Handler.Handle] by writing the Record to a JSONHandler, then calling [ServerSession.LoggingMessage] with the result.
(ctx context.Context, r slog.Record)
| 149 | // Handle implements [slog.Handler.Handle] by writing the Record to a JSONHandler, |
| 150 | // then calling [ServerSession.LoggingMessage] with the result. |
| 151 | func (h *LoggingHandler) Handle(ctx context.Context, r slog.Record) error { |
| 152 | err := h.handle(ctx, r) |
| 153 | // TODO(jba): find a way to surface the error. |
| 154 | // The return value will probably be ignored. |
| 155 | return err |
| 156 | } |
| 157 | |
| 158 | func (h *LoggingHandler) handle(ctx context.Context, r slog.Record) error { |
| 159 | // Observe the rate limit. |