Opened 4 years ago
Last modified 3 weeks ago
#33058 assigned Cleanup/optimization
Use DiscoverRunner's logger for logging when running checks
| Reported by: | Chris Jerdonek | Owned by: | pranavh03 |
|---|---|---|---|
| Component: | Testing framework | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Ülgen Sarıkavak | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | yes | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Currently, when a logger is passed to DiscoverRunner, there is at least one case where DiscoverRunner's logger isn't used for logging log-like messages. This is when DiscoverRunner runs the check command (code here) and displays a message like the "System check identified no issues ...."
While there is some overlap with ticket #21429 (which is about logging for all commands), I think this ticket can be kept separate because it can be done independently, and in particular either before or after that ticket is complete.
I do have at least one idea of how this ticket can be addressed pretty simply, and in a way that would help make tangible forward progress on #21429. I can add a comment to that ticket explaining the approach in order to keep followers of that ticket in the loop.
Change History (8)
comment:1 by , 4 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 3 years ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
comment:3 by , 20 months ago
| Cc: | added |
|---|
comment:4 by , 14 months ago
What pops in mind is to allow call_command to use external loggers via params, this may also help the code that uses stdout directly
comment:5 by , 6 weeks ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:6 by , 3 weeks ago
Hi team just made a fix : https://github.com/django/django/pull/19975
please check it out
comment:7 by , 3 weeks ago
| Has patch: | set |
|---|
comment:8 by , 3 weeks ago
| Needs tests: | set |
|---|
Sounds good, I'd be happy to review the patch.