From: Jonathan Amsterdam Date: Wed, 17 May 2023 20:12:42 +0000 (-0400) Subject: log/slog: add link to handler-writing guide X-Git-Tag: go1.21rc1~273 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9b57b33556e5d58807061b5b20757e88631d924b;p=gostls13.git log/slog: add link to handler-writing guide 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 TryBot-Result: Gopher Robot Run-TryBot: Jonathan Amsterdam --- diff --git a/src/log/slog/doc.go b/src/log/slog/doc.go index 3b242591fc..8237b4e3d5 100644 --- a/src/log/slog/doc.go +++ b/src/log/slog/doc.go @@ -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