-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Allow configuration of loggers through Caddyfile global options #4028
Allow configuration of loggers through Caddyfile global options #4028
Conversation
7040240
to
89eec90
Compare
89eec90
to
e66bcbb
Compare
e66bcbb
to
5e01204
Compare
c8f5a6f
to
db291e8
Compare
Hi @mholt @francislavoie , just checking in, any thoughts on the simplified approach this PR now takes? Happy to make any further iterations as wanted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for the effort! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, noticed a couple more things on a quick second pass, sorry 😅
ebe14d9
to
5507ec4
Compare
Alright, this is rebased on master now as well, if there's anything else just let me know! |
5507ec4
to
7c2f314
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for your reviews Francis and for the work on this, @kujenga -- LGTM, just one comment where a slight improvement could be made if I'm right. Ignore if not. :)
This change is aimed at enhancing the logging module within the Caddyfile directive to allow users to configure logs other than the HTTP access log stream, which is the current capability of the Caddyfile [1]. The intent here is to leverage the same syntax as the server log directive at a global level, so that similar customizations can be added without needing to resort to a JSON-based configuration. Discussion for this approach happened in the referenced issue. Closes caddyserver#3958 [1] https://caddyserver.com/docs/caddyfile/directives/log
7c2f314
to
d99bbd7
Compare
Alright, this has been rebased on master and I believe the last comment is now addressed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks for the contribution @kujenga ! Please feel free to contribute again sometime. :) Especially if any issues with these changes are reported later. Thank you!
Awesome, thank you! Feel free to ping me if anything does come up 👍 |
@kujenga would you like to take a shot at writing the docs for this? You can find them here https://github.com/caddyserver/website/blob/master/src/docs/markdown/caddyfile/options.md While you're at it, you could also add docs for the new redact filter to https://github.com/caddyserver/website/blob/master/src/docs/markdown/caddyfile/directives/log.md |
This corresponds with the changes in this PR: caddyserver/caddy#4028
This corresponds with the changes in this PR: caddyserver/caddy#4028
* caddyfile/directives/log: add docs for new replace directive This commit corresponds with the functionality added in this PR: caddyserver/caddy#4029 * caddyfile: add documentation for new global log option This corresponds with the changes in this PR: caddyserver/caddy#4028
This PR is a follow up on the previous attempt in #3968 but instead implemented as a global logging option.
It follows up on discussion in #3958 about adding more functionality to the Caddyfile. I also added in another commit for a small new "replace" filter aimed at the same goal as I wrote up in the original ticket, providing more tools to remove sensitive data from logs.
Closes #3958