Opened 3 years ago

Last modified 5 months ago

#33058 new Cleanup/optimization

Use DiscoverRunner's logger for logging when running checks

Reported by: Chris Jerdonek Owned by:
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Ülgen Sarıkavak Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:How to create a pull request

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.

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (4)

comment:1 by Mariusz Felisiak, 3 years ago

Triage Stage: UnreviewedAccepted

I do have at least one idea of how this ticket can be addressed pretty simply, ...

Sounds good, I'd be happy to review the patch.

comment:2 by Mariusz Felisiak, 2 years ago

Owner: Chris Jerdonek removed
Status: assignednew

comment:3 by Ülgen Sarıkavak, 11 months ago

Cc: Ülgen Sarıkavak added

comment:4 by Ahmed Ibrahim, 5 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

Note: See TracTickets for help on using tickets.
Back to Top