chore: demote session established log level#4564
Conversation
crates/net/network/src/manager.rs
Outdated
There was a problem hiding this comment.
I'd rather go for debug level, because these logs are not as frequent as other network-related logs we already have on trace level in other crates.
There was a problem hiding this comment.
Also maybe combine it with the next debug log Established peer enode?
There was a problem hiding this comment.
debatable because of the intention of the log: debug as the name suggests is mostly for debugging, trace is for more detailed information about a particular action of the application
There was a problem hiding this comment.
In my head trace was always about even more hardcore debugging than debug, and mostly useful for core devs who want to step through the function behavior using these trace logs. While debug is also for regular users, who would like to know that, e.g. in the case, they established a connection with some peer but without too much implementation-specific details.
There was a problem hiding this comment.
both trace and debug are for debugging, imo we abuse trace a little and do not use debug when needed. I usually use debug when it can be read from the console but we don't want to have it in a normal flow, and trace if it is something that can only be read if it is in file (log too big or it is frequent (spammy)).
Codecov Report
... and 107 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
00ee096 to
8215a66
Compare
| ); | ||
| debug!(target: "net", kind=%direction, peer_enode=%NodeRecord::new(remote_addr, peer_id), "Established peer enode"); |
There was a problem hiding this comment.
thoughts on adding the enode back? it was useful when investigating suspicious peers
mattsse
left a comment
There was a problem hiding this comment.
added the enode to the log
Description
Demote the log level of "Session Established" to
debug