Message86198
| Author |
shamilbi |
| Recipients |
shamilbi, vinay.sajip |
| Date |
2009年04月20日.15:29:28 |
| SpamBayes Score |
0.052927323 |
| Marked as misclassified |
No |
| Message-id |
<1240241370.22.0.444370587567.issue5170@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
(python 2.6.2, WinXP)
logging to console stopped working. Here is a workaround:
logging/__init__.py:
class StreamHandler(Handler):
...
def emit(self, record):
...
if (isinstance(msg, unicode) or
getattr(stream, 'encoding', None) is None):
- stream.write(fs % msg)
+ if stream == sys.stdout:
+ print(msg)
+ else:
+ stream.write(fs % msg) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年04月20日 15:29:30 | shamilbi | set | recipients:
+ shamilbi, vinay.sajip |
| 2009年04月20日 15:29:30 | shamilbi | set | messageid: <1240241370.22.0.444370587567.issue5170@psf.upfronthosting.co.za> |
| 2009年04月20日 15:29:28 | shamilbi | link | issue5170 messages |
| 2009年04月20日 15:29:28 | shamilbi | create |
|