[Twisted-Python] Twisted logger changes

Maciej Wasilak wasilak at gmail.com
Tue Jun 9 13:42:56 MDT 2015


Dear Glyph,

2015-06-09 8:09 GMT+02:00 Glyph <glyph at twistedmatrix.com>:
>
> Although logger is reacting to this in a bad way, and that is a bug, your
> program has a bug too: you are printing to a text file (which is what stdout
> is when it is redirected to a log) by using binary data.  python 3 will
> mangle your output if you try to do this, so you should restrict your
> program to unicode if you intend to redirect stdout to a logger.
>

Thank you for your help. I'll update my library, and replace all
occurences of print with log.msg("").

> Therefore this is a regression in the new logging system.  I've filed it as
> a bug, here: <https://twistedmatrix.com/trac/ticket/7933>.  In the future, I
> would encourage you to take advantage of the pre-release testing period to
> discover issues like this, since it would have been nice to know about this
> before the final release went out ;-).  (Not to say this is your fault
> though, this is totally our bug, and I'm surprised we didn't catch it given
> all the other similar stuff we caught before the release.)
>

I've found the problem only after installing PyPI package with
'twisted>=14.0.0' dependency on new system. Sorry!
Thanks again for excellent work!

Best Regards
Maciej Wasilak




More information about the Twisted-Python mailing list