#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):

 Is this ticket available? I would like to take up.

 I went through the `DiscoverRunner` class and I found 7 instances where
 `print` was used.

 I believe a good starting approach would be to classify the print
 statements on the bases of their logging levels.

 105: `print("\nOpening PDB: %r" % exc_value)` -> DEBUG

 142: `print("""Subtest failed: ...``` -> ERROR

 172 & 186 : Two print statements in the `check_picklable()` -> ERROR

 594: `print('Including test tag(s): %s.' % ', '.join(sorted(self.tags)))`
 -> INFO

 596: `print('Excluding test tag(s): %s.' % ',
 '.join(sorted(self.exclude_tags)))` -> INFO

 681: `print('Skipping setup of unused database(s): %s.' % ',
 '.join(sorted(unused_databases)))` -> INFO

 Let me know if this is the right way to proceed!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32552#comment:2>
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.b4423461fc9a401e197fd41e34193994%40djangoproject.com.

Reply via email to