-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix: fix incorrect error logging format #422
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request involves a minor modification to error logging in the Changes
The specific change transforms the log statement from: l.Error("Error shutting down http server: %w", err) to: l.Error("Error shutting down http server", "err", err) This modification likely reflects a change in the logging library's recommended usage or a standardization of logging practices within the project. ✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
kroma-validator/validator.go (1)
Line range hint
201-201
: Consider using structured logging format for consistency.While outside the scope of this PR, consider updating this direct error logging to use the structured key-value pair format for consistency:
-v.l.Error(err.Error()) +v.l.Error("failed to fetch latest block number", "err", err)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
kroma-validator/validator.go
(1 hunks)
🔇 Additional comments (1)
kroma-validator/validator.go (1)
57-57
: LGTM! Correct logging format that aligns with the codebase patterns.The change from
%w
formatting to structured key-value pair logging is correct and improves consistency with other error logging patterns in the file. This format enables better log parsing and filtering capabilities.
View your CI Pipeline Execution ↗ for commit 3576858.
☁️ Nx Cloud last updated this comment at |
Description
The
l.Error
method from thelog
package doesn't support the%w
formatting verb. This causes%w
to be logged as a literal string instead of wrapping the error. I've updated the code to use the correct formatting for logging errors withlog.Logger
. This ensures errors are logged properly without losing context.