I am using a logging configuration file with a Syslog handler. I am using nxlog. The documentation says "On Windows, you pretty much have to use the UDP option".
[handler_syslogHandler]
class=handlers.SysLogHandler
level=DEBUG
formatter=syslogFormatter
args=(('localhost', 1514), handlers.SysLogHandler.LOG_LOCAL5, 1)
Note that using socket.SOCK_STREAM raises an exception NameError: name 'socket' is not defined
so I had to replace the numeric equivalent in the args list.
Could you provide more details about the remark in python docs? Why only UDP on Windows?
I suspect that this documentation is just out of date/understating your options... Back when syslog was first implemented there was only one network transport for it and that was UDP. However if you used UNIX and had a local syslog daemon, you could use domain sockets to send logs to that server.
In those times, therefore, the only real option for Windows was to use UDP sockets (as Windows doesn't have domain sockets). However since 2009, there have been other options as other transports have become available and then made available in Python.
To be doubly sure, I just checked out your config file on my Windows installation and it's fine. The socket error is simply that it doesn't recognize the name and Python was still perfectly happy to try to connect to the TCP socket.