From 9b57b33556e5d58807061b5b20757e88631d924b Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Wed, 17 May 2023 16:12:42 -0400 Subject: [PATCH] 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 --- src/log/slog/doc.go | 4 ++++ 1 file changed, 4 insertions(+) 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