➜

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.

Author cybergrind
Recipients cybergrind
Date 2021-06-02.18:31:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622658712.23.0.244922352408.issue44291@roundup.psfhosted.org>
In-reply-to
Content
Probably we should make the behavior of SysLogHandler consistent with other Socket handlers.

Right now SocketHandler and DatagramHandler implement such behavior:

1) on `close` set `self.socket = None`
2) when trying to send - make socket when it is None


SysLogHandler doesn't implement this behavior and when you close the socket for some reason (eg. restart of uWSGI server on code change) it leaves it in the closed state, then raises an error when you try to send any message because it is closed

```
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.9/logging/handlers.py", line 959, in emit
    self.socket.sendto(msg, self.address)
OSError: [Errno 9] Bad file descriptor

```
History
Date User Action Args
2021-06-02 18:31:52cybergrindsetrecipients: + cybergrind
2021-06-02 18:31:52cybergrindsetmessageid: <1622658712.23.0.244922352408.issue44291@roundup.psfhosted.org>
2021-06-02 18:31:52cybergrindlinkissue44291 messages
2021-06-02 18:31:52cybergrindcreate