slog: rename HandlerOptions.AtomicLevel to Level
Change-Id: Iac666c8486d72629cda346b340915c2a89dd50b7
Reviewed-on: https://go-review.googlesource.com/c/exp/+/429837
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
diff --git a/slog/handler.go b/slog/handler.go
index 4a876e1..b463876 100644
--- a/slog/handler.go
+++ b/slog/handler.go
@@ -73,9 +73,9 @@
// "file:line".
AddSource bool
- // Ignore records with levels above AtomicLevel.Level.
+ // Ignore records with levels above Level.Level.
// If nil, accept all levels.
- AtomicLevel *AtomicLevel
+ Level *AtomicLevel
// If set, ReplaceAttr is called on each attribute of the message,
// and the returned value is used instead of the original. If the returned
@@ -99,7 +99,7 @@
// Enabled reports whether l is less than or equal to the
// maximum level.
func (h *commonHandler) Enabled(l Level) bool {
- return l <= h.opts.AtomicLevel.Level()
+ return l <= h.opts.Level.Level()
}
func (h *commonHandler) with(as []Attr) *commonHandler {