-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log/slog: add DiscardHandler #70296
log/slog: add DiscardHandler #70296
Conversation
This adds a package-level variable, slog.Discard, which is a slog.Handler which performs no output. This serves a similar purpose to io.Discard. Fixes golang#62005
This PR (HEAD: 8f714b1) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/626486. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Ian Lance Taylor: Patch Set 2: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-12T04:06:26Z","revision":"62178854c5227d6614456061319034180eceb5e5"} Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Ian Lance Taylor: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 2: This CL has failed the run. Reason: Tryjob golang/try/gotip-linux-amd64-boringcrypto has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
This PR (HEAD: 5443570) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/626486. Important tips:
|
Message from Jonathan Amsterdam: Patch Set 3: Commit-Queue+1 (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-12T17:35:16Z","revision":"ccceedb8e6ba186e1e5cec5579eed1017d68ddc1"} Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 3: This CL has failed the run. Reason: Tryjob golang/try/gotip-windows-386 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
This PR (HEAD: 3f05e6a) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/626486. Important tips:
|
Message from Jonathan Amsterdam: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Carlana Johnson: Patch Set 4: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 4: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 4: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Carlana Johnson: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 5: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Carlana Johnson: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Carlana Johnson: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Carlos Amedee: Patch Set 5: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Ian Lance Taylor: Patch Set 5: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-14T17:34:47Z","revision":"3facfa330a8d1a1e7c6bc61138b9cb13e9674863"} Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Ian Lance Taylor: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Ian Lance Taylor: Patch Set 5: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 5: This CL has failed the run. Reason: Tryjob golang/try/gotip-windows-386 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Carlana Johnson: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
This PR (HEAD: 0a61117) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/626486. Important tips:
|
Message from Jonathan Amsterdam: Patch Set 5: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-14T19:40:20Z","revision":"3facfa330a8d1a1e7c6bc61138b9cb13e9674863"} Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 6: Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 6: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-14T20:20:41Z","revision":"0ff322149e89d7ca1c3083fcd582c084ecc8fae6"} Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Jonathan Amsterdam: Patch Set 6: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 6: This CL has failed the run. Reason: Tryjob golang/try/gotip-windows-386 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 6: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Ian Lance Taylor: Patch Set 7: Auto-Submit+1 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
Message from Go LUCI: Patch Set 7: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-11-14T22:03:49Z","revision":"9b74c1bc40641ebdc0e4d926c17d0ab48d8494c1"} Please don’t reply on this GitHub thread. Visit golang.org/cl/626486. |
This adds a package-level variable, slog.DiscardHandler, which is a slog.Handler which performs no output. This serves a similar purpose to io.Discard. Fixes #62005 Change-Id: Ia8babc55f860dec9b663a5c400090a7669608fd5 GitHub-Last-Rev: 0a61117 GitHub-Pull-Request: #70296 Reviewed-on: https://go-review.googlesource.com/c/go/+/626486 Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This PR is being closed because golang.org/cl/626486 has been merged. |
This adds a package-level variable, slog.DiscardHandler, which is a
slog.Handler which performs no output. This serves a similar purpose
to io.Discard.
Fixes #62005