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

Option to disable logs for health checks #227

Open
hypnoglow opened this issue Nov 4, 2024 · 5 comments
Open

Option to disable logs for health checks #227

hypnoglow opened this issue Nov 4, 2024 · 5 comments

Comments

@hypnoglow
Copy link

Health check endpoint logs are noisy, and we prefer to disable them in most apps.

It would be great if we could disable them when using binary from cmd/riverui.

I believe this should be configurable using slog-http Config.Filters here: https://github.com/riverqueue/riverui/blob/master/cmd/riverui/main.go#L97C21-L97C27

@TArch64
Copy link
Contributor

TArch64 commented Nov 26, 2024

Some time ago I added an env to change log level when you using a standalone server but it still in unreleased changes. You can try to build a new image from repo and check if it fixes your issue. Setting this env to error level resolved my issue with riverui spamming my console. Command to build a new image you can find in makefile it’s pretty simple

@bgentry
Copy link
Contributor

bgentry commented Nov 26, 2024

@TArch64 that was just released in v0.6.0, sorry for the delay!

@hypnoglow I'm not quite sure the best way to make this toggle-able. I guess a boolean flag, but I'm having trouble thinking of good names. Got any ideas and want to take a crack at a PR for it?

@TArch64
Copy link
Contributor

TArch64 commented Nov 27, 2024

@bgentry do you think it should be as a new option? Health check logs looks like info or debug logs so if you want to have less logs you need to set another log level

@bgentry
Copy link
Contributor

bgentry commented Nov 27, 2024

I believe the only logs there are for the request, same as the other request logs. Health check routes are noisy enough to warrant a special setting to either disable them or change the level to debug based on the filter.

@bgentry
Copy link
Contributor

bgentry commented Nov 27, 2024

Maybe -silent-healthchecks or -health-check-log-level?

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

No branches or pull requests

3 participants