In addition to the old-good connected-UDP logging, support for unconnected
socket (datagram) is now available.

It supports unconnected udp, multicast, unix socket and unix socket in
abstract namespace:

# to unix socket
--log-socket /tmp/uwsgilogger
# in abstract namespace
--log-socket @uwsgilogger
# udp
--log-socket 192.168.0.1:4444
# multicast
--log-socket 224.0.0.1:5555

The most interesting is probably multicast as it allows you to have log
redundancy.

A simple twisted logger in the abstract namespace:

from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor

class Echo(DatagramProtocol):

    def datagramReceived(self, data, foo):
        print "received %r" % data

reactor.listenUNIXDatagram('\0uwsgilogger', Echo())
reactor.run()

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to