This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane
Date 2021-04-03.11:14:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617448485.13.0.0997125789573.issue43711@roundup.psfhosted.org>
In-reply-to
Content
See cgi.initlog():
https://github.com/python/cpython/blob/b2a91e0c9ee18b50cc86b21211c2258520a9f5d0/Lib/cgi.py#L82

```
            logfp = open(logfile, "a")
```

This feature is not documented but can be used like this.

```
import cgi
cgi.logfile="myapp.log"
cgi.log("こんにちは")
```

I want to change log file encoding to UTF-8. Although this is backward incompatible change, it unlikely break user application because it just change the logfile encoding.

UTF-8 is safer than locale encoding because UTF-8 supports all valid Unicode strings.
History
Date User Action Args
2021-04-03 11:14:45methanesetrecipients: + methane
2021-04-03 11:14:45methanesetmessageid: <1617448485.13.0.0997125789573.issue43711@roundup.psfhosted.org>
2021-04-03 11:14:45methanelinkissue43711 messages
2021-04-03 11:14:44methanecreate