Comments on: SysLogHandler not writing to syslog with Python logging http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/ Code and comments on web development, Django, Python and things (un)related. Wed, 03 Apr 2013 13:15:20 +0000 hourly 1 http://wordpress.org/?v=4.3 By: Gérald http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/comment-page-1/#comment-1094 Fri, 24 Feb 2012 16:27:40 +0000 http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/#comment-1094 Thanks a lot for this post, it solves my problem.

By the way, the default behaviour is a bit stupid …

]]>
By: Jamshid http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/comment-page-1/#comment-805 Tue, 13 Jul 2010 16:31:27 +0000 http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/#comment-805 Found this page via google. You don’t have to use /dev/log if you make the syslog server accept remote logging requests (ie, listen on UDP 514). At least on Ubuntu, just add “-r” to /etc/default/syslogd.

http://linux.about.com/od/commands/l/blcmdl8_syslogd.htm

This option is introduced in version 1.3 of the sysklogd package.
Please note that the default behavior is the opposite of how older
versions behave, so you might have to turn this on.

]]>
By: Max http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/comment-page-1/#comment-697 Thu, 09 Jul 2009 06:54:37 +0000 http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/#comment-697 How to properly log exceptions to syslog? I’ve configured syslog-ng to log python messages to separate file and unfortunately only first line of traceback is logged to it (other are routed to /var/log/messages).

]]>
By: Eric http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/comment-page-1/#comment-291 Tue, 19 Aug 2008 16:49:03 +0000 http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/#comment-291 For a configuration file, change the (host,port) tuple in the args of the handler to “/dev/log”
For example:

[handler_syslog]
class:handlers.SysLogHandler
level=NOTSET
args:((‘localhost’,handlers.SYSLOG_UDP_PORT),handlers.SysLogHandler.LOG_USER)
formatter: form01

Change args to:
args:(“/dev/log”,handlers.SysLogHandler.LOG_USER)

]]>
By: Manuel http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/comment-page-1/#comment-289 Wed, 13 Aug 2008 11:45:12 +0000 http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/#comment-289 Does somebody know how to apply that to a logger configuration file?

]]>
By: John http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/comment-page-1/#comment-143 Tue, 15 Jan 2008 19:02:58 +0000 http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/#comment-143 Thanks, that fixed my problem.

]]>