mirror of
https://github.com/golang/go.git
synced 2025-05-29 03:11:26 +00: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:
parent
10a66d6816
commit
759849187f
@ -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].
|
||||
|
Loading…
x
Reference in New Issue
Block a user