Message344212
> User would like Python logging of Unicode characters to be consistent
It is consistent. The encoding of
logging.basicConfig(filename='c:\\my_log.log')
is consistent with the encoding of
open('c:\\my_log.log')
Both use the system default encoding, which is not UTF-8. There is some discussion going on right now, as to whether it *should* be, but it isn't, and I wouldn't consider changing the behaviour of loging *without* changing the behaviour of open() to be consistent.
Logging to the console is consistent with the standard IO streams, and it was PEP 528 (https://www.python.org/dev/peps/pep-0528/) that made that change - before that, the standard IO streams, and logging to the console, used the console codepage.
So, while I agree that the behaviour takes a bit of work to understand, it's not (IMO) inconsistent, nor is it (IMO) a bug. |
|
Date |
User |
Action |
Args |
2019-06-01 19:55:22 | paul.moore | set | recipients:
+ paul.moore, vinay.sajip, tim.golden, SilentGhost, zach.ware, steve.dower, jonathan-lp |
2019-06-01 19:55:22 | paul.moore | set | messageid: <1559418922.45.0.236583342508.issue37111@roundup.psfhosted.org> |
2019-06-01 19:55:22 | paul.moore | link | issue37111 messages |
2019-06-01 19:55:22 | paul.moore | create | |
|