New submission from Lukáš Lalinský <[email protected]>:

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

----------
messages: 134265
nosy: lukas.lalinsky
priority: normal
severity: normal
status: open
title: SysLogHandler can't send long messages
type: crash
versions: Python 2.7

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11907>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to