1
0
mirror of https://github.com/golang/go synced 2024-09-29 19:14:28 -06:00

log/slog: clarify SetDefault behavior

Change-Id: I53250ca9e6d1ba69cc667949bebb5be2651a020d
Reviewed-on: https://go-review.googlesource.com/c/go/+/530477
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Jonathan Amsterdam 2023-09-25 08:41:31 -04:00
parent 10a66d6816
commit 759849187f

View File

@ -53,7 +53,8 @@ func init() {
// Default returns the default [Logger].
func Default() *Logger { return defaultLogger.Load() }
// SetDefault makes l the default [Logger].
// SetDefault makes l the default [Logger], which is used by
// the top-level functions [Info], [Debug] and so on.
// After this call, output from the log package's default Logger
// (as with [log.Print], etc.) will be logged using l's Handler,
// at a level controlled by [SetLogLoggerLevel].