]> Cypherpunks repositories - gostls13.git/commitdiff
log/slog: Handler doc points to handler guide
authorJonathan Amsterdam <jba@google.com>
Wed, 26 Mar 2025 15:05:29 +0000 (11:05 -0400)
committerJonathan Amsterdam <jba@google.com>
Wed, 26 Mar 2025 18:06:06 +0000 (11:06 -0700)
There's a link in the package doc, but there should be one here too.

For #73057.

Change-Id: I8f8fe73f20bb6dd49cdf23b5f7634a92d4f7add9
Reviewed-on: https://go-review.googlesource.com/c/go/+/661015
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/log/slog/handler.go

index 0451ea8fdcc126b30ad391fb71ab36ff72a10d41..66eea02aa576d3b25467b03885b357522b656bd2 100644 (file)
@@ -28,6 +28,8 @@ import (
 //
 // Users of the slog package should not invoke Handler methods directly.
 // They should use the methods of [Logger] instead.
+//
+// Before implementing your own handler, consult https://go.dev/s/slog-handler-guide.
 type Handler interface {
        // Enabled reports whether the handler handles records at the given level.
        // The handler ignores records whose level is lower.