Repository navigation
fix: Modify Evolve node logging to remove noise #2496
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -125,7 +125,7 @@ func submitToDA[T any]( | |||||
| // Record successful DA submission | ||||||
| m.recordDAMetrics("submission", DAModeSuccess) | ||||||
|
|
||||||
| m.logger.Info(fmt.Sprintf("successfully submitted %s to DA layer", itemType), "gasPrice", gasPrice, "count", res.SubmittedCount) | ||||||
| m.logger.Info(fmt.Sprintf("successfully submitted %s to DA layer with gasPrice %v and count %d", itemType, gasPrice, res.SubmittedCount)) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change moves away from structured logging by formatting all values into the message string. Structured logging with key-value pairs is generally preferred as it makes logs easier to parse, query, and analyze automatically. The previous implementation was better in this regard. To maintain structured logging and improve consistency, consider using a static message and passing all dynamic values as key-value pairs.
Suggested change
|
||||||
| if res.SubmittedCount == uint64(remLen) { | ||||||
| submittedAll = true | ||||||
| } | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,11 @@ func SetupLogger(config rollconf.LogConfig) logging.EventLogger { | |
|
|
||
| logging.SetupLogging(logCfg) | ||
|
|
||
| // Suppress noisy external component logs by setting them to FATAL level | ||
| _ = logging.SetLogLevel("header/store", "FATAL") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should do something to force debug mode on all in order to help with debugging. Something could be hidden in the logs and this would hide it
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modified it to only supress this by default and enable them if debug logging is enabled in 3243175 |
||
| _ = logging.SetLogLevel("header/sync", "FATAL") | ||
| _ = logging.SetLogLevel("header/p2p", "FATAL") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The repeated calls to noisyComponents := []string{"header/store", "header/sync", "header/p2p"}
for _, component := range noisyComponents {
if err := logging.SetLogLevel(component, "FATAL"); err != nil {
// This is a developer error, so we should panic.
panic(fmt.Sprintf("failed to set log level for %q: %s", component, err))
}
} |
||
|
|
||
| // Return a logger instance for the "main" subsystem | ||
| return logging.Logger("main") | ||
| } | ||
|
|
||
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.
For consistency with other log statements in this file and for better machine-readability, it's best to use structured logging with key-value pairs instead of concatenating values into the message string.