-
Notifications
You must be signed in to change notification settings - Fork 96
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
Lower logging level of an error #481
Comments
No, it's not 'completely harmless and unimportant'. Prolonged failure to update fee rates can have severe consequences in Lightning, for example leading to feerate disagreements with the counterparty and force-closures. So periodically retrieving current fee rates is vital for the correct operation of a Lightning node, which is why we log this as error, and even enforce a successful fee rate cache update on startup. If this is spamming your logs, you need to figure out why it fails and fix your chain source.
Thank you for the explainer on log levels. |
Prolonged is the keyword. A single failure is 'completely harmless and unimportant'. An error could be printed when the fee rates are stale not every time the call failed. Otherwise every brief transient error lead to error level logs, which is operationally exhausting. If someone wants to e.g. get a text message whenever their production services need attention, doing it on log level basis is a natural approach. But for that to work well, messages that are printed at highest logging levels need to be actually important, not just "maybe, kind of in the area that is important". |
ldk-node/src/chain/mod.rs
Line 803 in edb0560
In our dev environment, where regtest is used, this log line spams the log outputs with an error logging level, despite being completely harmless and unimportant.
Good opportunity to discuss my pet peeve: "error logging level" is a misnomer, and tragically it compels developers to log everything that looks like an "error" with "error logging level".
Since log levels are supposed to be ... well... levels, they come with an increased severity/importance. In most higher level software most "errors" are completely unimportant and expected, and do not deserve "error logging level". I generally recommend not using the name "error level" at all, or internally rename it to a "fault", "severe" or "important", just to remind developers "error" != "error logging level".
The text was updated successfully, but these errors were encountered: