-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Clarify log level dependency between the SDK and Comet #15495
Comments
this is known, we dont have filter logging on previous versions only log levels, but an app can override using interceptconfig and place their own logger with custom loggging features. They can use the tendermint logger as well.
the logger is passed to comet in start node, if comet would like a separate logger then they would have to do it. We are setting the logger for apps and in turn passing it to comet as its required. what is the issue with setting it to debug, this is the first time i have heard of this issue |
so, the idea will be to implement the log-level syntax in SDK to make it compatible with CometBFT, this way it won't fail and will be future compatible if we will have more loggers (per module). |
We have a function compatible with both now for filtering: https://pkg.go.dev/cosmossdk.io/log#FilterKeys. |
Thanks all for the quick feedback.
Not sure I understand what you mean here. It's ok to set things to debug. But it's not ok to break the app by configuring Comet I don't have specific solutions yet. But to make sure the problem is understood: the per-module
Neat! A couple of questions for me to understand better:
|
So v0.47 reverted to use CometBFT logger directly, which made the filtering working again in that version.
In the next version (v0.48), we've refactored away the usage of CometBFT logger but kept the filtering behavior. |
Summary of problem
From my current understanding, briefly:
log_level
in config.toml can break the SDK-level logging--log_level
at the CLI overrides the Comet-level logging directivePut differently, the SDK enforces
log_level
to be the same across the application and Comet. I'm not sure this is ideal, it might be good to break this dependency.More context on the problem
CometBFT allows log level to be configured on a per-module basis, for example:
log_level = "p2p:info,state:info,statesync:info,*:error"
. The SDK depends on thelog_level
string (ref), but the SDK has no knowledge of Comet-level modules (p2p, statesync). For this reason, if we parametrize config.toml with thelog_level
above, the SDK will thrown an errorcosmos-sdk/server/util.go
Lines 148 to 152 in 2582f0a
So if we configure
log_level
, an operator can't start the node due to the error above. This can be fixed by providing a log level in the CLI, for exampleThe problem now is that this disables the Comet
log_level
directive specified in config.toml.Requirements and question
The requirements from Comet side is we'd like to allow node operators to configure
log_level
to be able to debug.Is it possible or desirable to have independent log levels? One from Comet's config.toml, and another one from the CLI
--log_level
?Version
I'm aware of recent work here #14967, but doesn't seem to address the problem here. Let me know if I'm missing anything in the above, thanks!
The text was updated successfully, but these errors were encountered: