Message134265
It seems that logging.handlers.SysLogHandler can't handle messages that can't be passed atomically via the socket. I'm not sure what is the right behavior (the syslog() function truncates the message), but I think it shouldn't propagate the exception to the application.
Python 2.7.1 (r271:86832, Apr 18 2011, 08:47:29)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging.handlers
>>> handler = logging.handlers.SysLogHandler('/dev/log')
>>> logger = logging.getLogger()
>>> logger.addHandler(handler)
>>> logger.warn('x' * 4096)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/logging/handlers.py", line 808, in emit
self.socket.send(msg)
error: [Errno 40] Message too long
Logged from file <stdin>, line 1 |
|
Date |
User |
Action |
Args |
2011-04-22 13:52:18 | lukas.lalinsky | set | recipients:
+ lukas.lalinsky |
2011-04-22 13:52:18 | lukas.lalinsky | set | messageid: <1303480338.6.0.255798757577.issue11907@psf.upfronthosting.co.za> |
2011-04-22 13:52:16 | lukas.lalinsky | link | issue11907 messages |
2011-04-22 13:52:16 | lukas.lalinsky | create | |
|