Skip to content
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

log,kwild: allow increase log thresh on child loggers #759

Merged
merged 1 commit into from
May 22, 2024

Conversation

jchappelow
Copy link
Member

This adds the ability to raise the log level threshold for: RPC, cometbft, and DB (pg). This feature is helpful if you want to do things like:

  • run kwild with debug level logging, but don't want one of these systems spamming so you can set those to info
  • run kwild with default info level logging, but only want warnings (or worse) from cometbft, etc.

I would like the ability to set all subsystem loggers independently, including lowering the threshold, but zap only permits increasing the level for child loggers. This restriction seems to be a consequence of the zap core architecture.

@charithabandi
Copy link
Contributor

https://docs.cometbft.com/v0.37/core/running-in-production#logging

Cometbft already supports module level log specifications, Should we use that?

@jchappelow
Copy link
Member Author

jchappelow commented May 21, 2024

https://docs.cometbft.com/v0.37/core/running-in-production#logging

Cometbft already supports module level log specifications, Should we use that?

I don't have any particular cometbft module log level variations in mind.

But if you mean switch to a logger that is more usable, I'm all for that. cometbft uses https://github.com/go-kit/log, I believe. The stdlib slog is also likely a good choice. We'd have to do a survey.

@jchappelow jchappelow merged commit 16eee7b into kwilteam:main May 22, 2024
2 checks passed
@jchappelow jchappelow deleted the child-log-levels branch May 22, 2024 19:02
@Yaiba Yaiba added this to the v0.8.0 milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants