Alistair Coles c7d56fa9c5 py36: Fix syslog fallback to UDP
With py2 the SysLogHandler would raise an error if it could not
connect to the configured log_address socket. This prompted the
utils.get_logger() method to fallback to using UDP. With py3 an error
is not raised [1], so the fallback never happens. In that scenario,
exceptions are raised when swift services are started and attempt to
log.

This patch modifies get_logger() to test if the log_address is a socket
before instantiating a SysLogHandler and fallback to UDP if not a socket.

[1] https://github.com/python/cpython/blob/master/Lib/logging/handlers.py#L833-L842

Change-Id: Ic099fdc3925bf99f8528c7aa763b651c19df1322
2021-03-16 17:57:37 +00:00
..
2021-03-10 19:09:13 +00:00
2010-07-12 17:03:45 -05:00
2018-11-01 20:52:33 +00:00
2020-04-03 21:22:38 +02:00
2018-03-13 12:06:07 +00:00
2017-11-07 15:39:25 +11:00
2020-05-27 03:19:13 +00:00
2021-03-16 17:57:37 +00:00