request for logging SyslogHandler help

D

Doug Fort

Hi,

Perhaps this is as much a Unix question as a Python question.

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=()
 
V

Vinay Sajip

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top