Message315005
I was bitten by this porting a system from Python 2.7 to 3.6. "/dev/stderr" is a very nice default for logfiles. Users will frequently override the default, so you really want to open the logfile in append mode. Having to jump through hoops to avoid blasting a user's logfile is kinda dumb, and as others have pointed out, error-prone.
os.open works just fine with O_WRONLY|O_APPEND as the flags. /dev/null can be opened in append mode, but not /dev/stderr or /dev/stdout. |
|
Date |
User |
Action |
Args |
2018-04-05 19:40:33 | skip.montanaro | set | recipients:
+ skip.montanaro, hathawsh, vstinner, r.david.murray, martin.panter, ztane |
2018-04-05 19:40:33 | skip.montanaro | set | messageid: <1522957233.46.0.682650639539.issue27805@psf.upfronthosting.co.za> |
2018-04-05 19:40:33 | skip.montanaro | link | issue27805 messages |
2018-04-05 19:40:33 | skip.montanaro | create | |
|