homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: python-dev, vinay.sajip, vitaly
Priority: normal Keywords:

Created on 2012年10月08日 22:03 by vitaly, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (3)
msg172418 - (view) Author: Vitaly (vitaly) Date: 2012年10月08日 22:03
_connect_unixsocket() (see below) does not use socktype value that was passed into SysLogHandler.__init__():
 def _connect_unixsocket(self, address):
 self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
 # syslog may require either DGRAM or STREAM sockets
 try:
 self.socket.connect(address)
 except socket.error:
 self.socket.close()
 self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
 self.socket.connect(address)
msg172420 - (view) Author: Vitaly (vitaly) Date: 2012年10月08日 22:09
SOCK_DGRAM causes log messages larger than about 2000 bytes to be dropped altogether on MacOS X 10.7.5 and to be truncated to 2081 bytes on Linux (tested with Amazon's linux, which is based on centos). This is quite unfortunate, since many exception tracebacks for production apps are larger than 2000 bytes, and it's paramount to capture the entire traceback in order to debug the issue. This limitation can be overcome if _connect_unixsocket() used the socktype arg value that was passed to SysLogHandler constructor.
msg172454 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012年10月09日 07:23
New changeset 6e31832f8275 by Vinay Sajip in branch '2.7':
Issue #16168: Use specified socket type for domain sockets in SysLogHandler.
http://hg.python.org/cpython/rev/6e31832f8275
New changeset f41e6ef3392a by Vinay Sajip in branch '3.2':
Issue #16168: Use specified socket type for domain sockets in SysLogHandler.
http://hg.python.org/cpython/rev/f41e6ef3392a
New changeset e4212f81d633 by Vinay Sajip in branch '3.3':
Issue #16168: Merged SysLogHandler update from 3.2.
http://hg.python.org/cpython/rev/e4212f81d633
New changeset d7d3e1a03fe0 by Vinay Sajip in branch 'default':
Closes #16168: Merged SysLogHandler update from 3.3.
http://hg.python.org/cpython/rev/d7d3e1a03fe0 
History
Date User Action Args
2022年04月11日 14:57:37adminsetgithub: 60372
2012年10月09日 07:23:22python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg172454

resolution: fixed
stage: resolved
2012年10月08日 23:12:47vinay.sajipsetassignee: vinay.sajip
2012年10月08日 22:10:35r.david.murraysetnosy: + vinay.sajip
2012年10月08日 22:09:13vitalysetmessages: + msg172420
2012年10月08日 22:03:03vitalycreate

AltStyle によって変換されたページ (->オリジナル) /