Antoine Pitrou added the comment:
> However, from a smoke test, sys.stdout = LoggerWriter() doesn't seem to work
> as expected
I wasn't thinking about replacing sys.stdout (which I think is in general a bad
pattern, except for daemonized processes), rather being able to 1) either
replace the print() calls with logging calls with a similar API or 2) add a
file= argument to print calls.
(the 1) solution could look like "print =
logging.getLogger('foo').debug_printer()")
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22195>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com