#! /usr/bin/env python
import socket
import os
try:
os.remove("/dev/log")
except:
pass
s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
s.bind("/dev/log")
while True:
data, add = s.recvfrom(4096)
print data
Thanks to Brendon Caligari for help with this.