#32552: Change DiscoverRunner to use a logger instead of print
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage:
DiscoverRunner,print,logging,stdout,stderr| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Daniyal Abbasi):
Sure. As suggested, we could add a member function, something like this
{{{
def log(self, msg, level=2):
if self.verbosity >= level:
sys.stderr.write(msg + os.linesep)
}}}
Should we stick with `print` for now or use `sys.stderr.write` / `Logger`?
--
Ticket URL: <https://code.djangoproject.com/ticket/32552#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.9f52c96cb9be8b8d6d60c3644a126844%40djangoproject.com.