]> Cypherpunks repositories - gostls13.git/commitdiff
testing/slogtest: clarify that passed handler must be enabled at info
authorJonathan Amsterdam <jba@google.com>
Thu, 17 Aug 2023 20:00:08 +0000 (16:00 -0400)
committerJonathan Amsterdam <jba@google.com>
Tue, 29 Aug 2023 11:43:03 +0000 (11:43 +0000)
Fixes #62115.

Change-Id: I1ecd3048ccbf2014bc1d561c7cd79a0c2fe8e4bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/520676
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/testing/slogtest/slogtest.go

index 6f6fa902d5f28b25dbc41a8c8d3bab98d7fc3cf1..255d8bb9648bd622800bd8376717ccd33c93fad4 100644 (file)
@@ -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.