request for logging SyslogHandler help

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Aug 24 10:12:17 EDT 2004


> I really like the Python logging module, and I've used it extensively,
> with good results. Now I have a requirement to add a SysLogHandler,  and
> it's just not working. It looks like the socket is connecting, but nothing
> comes out on the log. (Fedora Core 2 /var/log/messages)
> 
> The simplest of many configurations I have tried is included below.
> A FileHandler in the same config file works fine.
> 
> Does anyone have experience in this area? Do I need a  special format or 
> something?
> 
> [handler_syslog]
> class=handlers.SysLogHandler
> level=NOTSET
> formatter=verboseformat
> args=()

Please check that the syslog destination is the local machine
(localhost) and that it is configured to work through UDP, on the
standard syslog port (514). Also, try with a short message format not
containing newlines (I would guess that "verboseformat" might generate
large messages).

Best of luck,


Vinay Sajip



More information about the Python-list mailing list