[MacPorts] #37990: python27 @2.7.3_1 SysLogHandler uses wrong default address for syslog
#37990: python27 @2.7.3_1 SysLogHandler uses wrong default address for syslog --------------------------+-------------------------------- Reporter: robertread@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: python27 --------------------------+-------------------------------- The logging.handlers.SysLogHandler() does not work on Mountain Lion (and probably Lion, but don't have it) by default. This is because the the Apple System Logger listens on UNIX dgram socket /var/run/syslog instead of the standard UDP port. The default address for the system python version of logging.handlers.SysLogHandler is '/var/run/syslog'. -- Ticket URL: <https://trac.macports.org/ticket/37990> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37990: python27 @2.7.3_1 SysLogHandler uses wrong default address for syslog ---------------------------+------------------- Reporter: robertread@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: python27 | ---------------------------+------------------- Changes (by larryv@…): * owner: macports-tickets@… => jwa@… Comment: Thanks for the ticket. In the future, please try to Cc relevant port maintainers. -- Ticket URL: <https://trac.macports.org/ticket/37990#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37990: python27 @2.7.3_1 SysLogHandler uses wrong default address for syslog ---------------------------+------------------- Reporter: robertread@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: python27 | ---------------------------+------------------- Comment (by robertread@…): OK, will do. Thanks! -- Ticket URL: <https://trac.macports.org/ticket/37990#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37990: python27 @2.7.3_1 SysLogHandler uses wrong default address for syslog ---------------------------+------------------- Reporter: robertread@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: python27 | ---------------------------+------------------- Comment (by jmr@…): Is this still a problem with 2.7.5? -- Ticket URL: <https://trac.macports.org/ticket/37990#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#37990: python27 @2.7.3_1 SysLogHandler uses wrong default address for syslog ---------------------------+------------------- Reporter: robertread@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: python27 | ---------------------------+------------------- Comment (by robertread@…): Yes, it still appears to be an issue in 2.7.5 - the default address for SysLogHandler is still set to a UDP port instead the /var/run/syslog unix socket. Here is a reproducer. WIth this snippet, I only see the message in /var/log/system.log if I uncomment the address parameter: {{{ import logging import logging.handlers logger = logging.getLogger() syslog = logging.handlers.SysLogHandler( # address='/var/run/syslog' ) formatter = logging.Formatter('%(name)s[%(process)d]: %(message)s') syslog.setFormatter(formatter) logger.addHandler(syslog) logger.warn("test message!") }}} -- Ticket URL: <https://trac.macports.org/ticket/37990#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts