Skip to content

Commit 9b57b33

Browse files
committed
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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Jonathan Amsterdam <[email protected]>
1 parent a7cb7df commit 9b57b33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/log/slog/doc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,5 +312,9 @@ Now computeExpensiveValue will only be called when the line is enabled.
312312
The built-in handlers acquire a lock before calling [io.Writer.Write]
313313
to ensure that each record is written in one piece. User-defined
314314
handlers are responsible for their own locking.
315+
316+
# Writing a handler
317+
318+
For a guide to writing a custom handler, see https://golang.org/s/slog-handler-guide.
315319
*/
316320
package slog

0 commit comments

Comments
 (0)