Repository navigation
refactor(logging): inline MustGetLogger's panic instead of utils.MustGet - #1854
Conversation
|
Hey @mbrandenburger 👋 thanks for the PR! This comment updates automatically as you push changes -- think of it as your PR's live scoreboard! PR Checks✅ DCO Sign-off -- All commits have valid sign-offs. Nice work! ❌ GPG Signature -- Heads up! The following commits don't have a verified GPG signature:
You'll need to sign your commits with GPG (e.g. ✅ Merge Conflicts -- No merge conflicts detected. Smooth sailing! ❌ Issue Link -- This PR is not linked to any issue. Please reference an issue using a closing keyword (e.g. ⏳ All checks must pass before this PR can be reviewed. You've got this! |
MustGetLogger routed through the generic utils.MustGet helper to turn GetLogger's error into a panic. Inline the check directly so the panic follows the regexp.MustCompile convention on its own terms, and document why GetLogger can only fail on a static invariant rather than runtime input. Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
9bf1f52 to
2de3284
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
Summary
MustGetLoggerrouted through the genericutils.MustGethelper to turnGetLogger's error into a panic. Inlines that check directly so the panic follows theregexp.MustCompileconvention on its own terms, without depending on the generic helper.MustGetLogger,GetLogger, andGetPackageNameexplaining whyGetLoggercan only fail on a static invariant (the caller's stack frame can't be resolved) rather than runtime input, which is why panicking on it here is appropriate.TestMustGetLoggeras a regression test for the inlined panic/return path.Test plan
go test ./platform/common/services/logging/...make checks