While the Python standard library offers a syslog module,
it seem to be a wrapper around the POSIX syslog system
calls. This means you cannot use it to send syslog messages
over the network.
The code below implements a
send function as described in
RFC 3164. It has been used in production on Windows boxes sending
messages to a Linux syslog server.
For this to work you must configure your syslog daemon to accept logs from
If you put it in a file
syslog_client.py you can use it as a module.
You can easily extend the class in several ways. E.g., you may want to add
some convenience functions like