-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[proxy] Produce access logs only for non-200 requests #4740
Comments
I'm not convinced that Caddy can do this out of the box. I found nothing in the docs our sources that would indicate conditional logging. |
Probably there's a "tricky" way to do it with Caddy (need to double-check on its version, tho). Setting the https://caddyserver.com/docs/caddyfile/directives/log I'm defining this "tricky" because it's more a side effect than an ability to effectively select what to log and what to do not log. |
… requests The rationale is that by changing the `level` key of the `log` directive (default INFO). The `warn` value should be enough to achieve the task in #4740 Ref.: https://caddyserver.com/docs/caddyfile/directives/log Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
I think we should not use the default logger and instead write a small plugin like this one and just set the fields we need. |
This ^^^ would be the correct way to go. I agree. Just to clarify: I defined my attempt as a trick for this exact reason :) |
Thereby cleaning up the proxy logs and making them more useful.
The text was updated successfully, but these errors were encountered: