swift/test/unit
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
..
account replace md5 with swift utils version 2020-12-15 09:52:55 -05:00
cli Merge "Change alignment on compact output" 2021-03-15 12:41:26 +00:00
common py36: Fix syslog fallback to UDP 2021-03-16 17:57:37 +00:00
container Merge "sharder: only shrink to root if all ranges are involved" 2021-03-15 19:30:06 +00:00
obj Fix os.link exceptions in diskfile.relink_paths 2021-03-12 09:24:49 -06:00
proxy Fix logging in proxy container GET path 2021-01-22 13:10:16 +00:00
test_locale py3: port the test of locale 2019-06-19 09:54:14 -07:00
__init__.py Move DebugLogger to its own module 2021-01-22 10:45:01 -06:00
helpers.py Allow internal clients to use reserved namespace 2019-11-27 11:22:00 -06:00