diff options
author | Jonathan Amsterdam <jba@google.com> | 2023-09-25 08:41:31 -0400 |
---|---|---|
committer | Jonathan Amsterdam <jba@google.com> | 2024-01-08 18:26:18 +0000 |
commit | 759849187f51e40e36a507656485e34170f77497 (patch) | |
tree | 5c230ea41358b169ef529da01587fac50d5156f4 | |
parent | 10a66d681672a8600705a7540e3b0477d4c43c4a (diff) | |
download | go-759849187f51e40e36a507656485e34170f77497.tar.gz go-759849187f51e40e36a507656485e34170f77497.zip |
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>
-rw-r--r-- | src/log/slog/logger.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/log/slog/logger.go b/src/log/slog/logger.go index 4d21ee7990..10aa6a2b31 100644 --- a/src/log/slog/logger.go +++ b/src/log/slog/logger.go @@ -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]. |