]> Cypherpunks repositories - gostls13.git/commitdiff
log/slog: add link to handler-writing guide
authorJonathan Amsterdam <jba@google.com>
Wed, 17 May 2023 20:12:42 +0000 (16:12 -0400)
committerJonathan Amsterdam <jba@google.com>
Wed, 24 May 2023 20:58:16 +0000 (20:58 +0000)
Add a shortlink in the doc to a guide to writing handlers, which is a work
in progress.

Change-Id: I1b01c90468382ffe53d9ad6f38253906e3f44857
Reviewed-on: https://go-review.googlesource.com/c/go/+/495920
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>

src/log/slog/doc.go

index 3b242591fc789aa462f3ad1de5feb175e6ac4974..8237b4e3d5c45d84dec2ea0284cd5dd5ec8bdb93 100644 (file)
@@ -312,5 +312,9 @@ Now computeExpensiveValue will only be called when the line is enabled.
 The built-in handlers acquire a lock before calling [io.Writer.Write]
 to ensure that each record is written in one piece. User-defined
 handlers are responsible for their own locking.
+
+# Writing a handler
+
+For a guide to writing a custom handler, see https://golang.org/s/slog-handler-guide.
 */
 package slog