From e016fabb55d0a50b6eeb9c85b0a5d42e27e8c8f3 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Thu, 17 Aug 2023 16:00:08 -0400 Subject: [PATCH] testing/slogtest: clarify that passed handler must be enabled at info Fixes #62115. Change-Id: I1ecd3048ccbf2014bc1d561c7cd79a0c2fe8e4bd Reviewed-on: https://go-review.googlesource.com/c/go/+/520676 Run-TryBot: Jonathan Amsterdam Reviewed-by: Alan Donovan TryBot-Result: Gopher Robot --- src/testing/slogtest/slogtest.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/testing/slogtest/slogtest.go b/src/testing/slogtest/slogtest.go index 6f6fa902d5..255d8bb964 100644 --- a/src/testing/slogtest/slogtest.go +++ b/src/testing/slogtest/slogtest.go @@ -36,6 +36,7 @@ type testCase struct { // // TestHandler installs the given Handler in a [slog.Logger] and // makes several calls to the Logger's output methods. +// The Handler should be enabled for levels Info and above. // // The results function is invoked after all such calls. // It should return a slice of map[string]any, one for each call to a Logger output method. -- 2.50.0