actix-web
actix-web copied to clipboard
feat: add ability to specify log level for access logger
Hi,
This add a new feature to the Logger middleware to set the level of the log.
Example
Logger::default().level(Level::Debug);
This would ideally go together with https://github.com/actix/actix-web/pull/3086
PR Checklist
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] A changelog entry has been made for the appropriate packages.
- [x] Format code with the latest stable rustfmt.
- [ ] (Team) Label with affected crates and semver status.
Hi,
This is complete also, it may conflict with the pr: https://github.com/actix/actix-web/pull/3086 because it add the same deps for test the logs, I may rebase the one of the two pr based on the one that is merged before.
Regards
Thanks for the work you've put into this.
I'm planning on migrating all the actix/* codebases over to tracing gradually, but dynamic logging levels is not something that's well supported by that ecosystem. The benefits definitely outweigh that but it means this PR is probably never going to land as-is.
We can revisit this idea after the tracing migration.