cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.19k stars 3.58k forks source link

[Bug]: Log module error: using <module>:none in log_level throws error #21513

Closed shupcode closed 2 weeks ago

shupcode commented 2 weeks ago

Is there an existing issue for this?

What happened?

Was sent here by @melekes from the cometbft closed issue https://github.com/cometbft/cometbft/issues/3436#issuecomment-2325821884

When using <module>:none in log_level under config.toml, a fatal error is thrown - Error: invalid log level none in log level list

In light of chains having a ton of oracle-related logs (neutron, dydx), I was trying to configure my log to stop printing oracle-related logs.

Can confirm this error in every chain I tried including dydx, neutron, gaia.

CometBFT team says it's not their problem.

Is this a Cosmos-SDK issue? Or do I need to open an issue on every chain that uses the same logging module?

Cosmos SDK Version

0.50

How to reproduce?

No response

julienrbrt commented 2 weeks ago

Hey, correct, none is not a log level. I think you want to use disabled. So in your case, <module>:disabled.

julienrbrt commented 2 weeks ago

Here how to use it btw: --log_level string The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>') (default "info")

shupcode commented 2 weeks ago

Here how to use it btw: --log_level string The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>') (default "info")

Can we have this properly documented at https://docs.cosmos.network/main/user/run-node/run-node#logging ? The current documentation is sorely lacking especially when cometbft is using different level names like none?