Message390120
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. |
|
| Date |
User |
Action |
Args |
| 2021-04-03 11:14:45 | methane | set | recipients:
+ methane |
| 2021-04-03 11:14:45 | methane | set | messageid: <1617448485.13.0.0997125789573.issue43711@roundup.psfhosted.org> |
| 2021-04-03 11:14:45 | methane | link | issue43711 messages |
| 2021-04-03 11:14:44 | methane | create | |
|