[Django]-Django/Python app logging does not working

7👍

I found what was the problem. Instead of /dev/log my version of OS X has /var/run/syslog. So:

if DEBUG or not os.path.exists('/dev/log'):
    LOGGING['handlers']['syslog']['address'] = '/var/run/syslog'

0👍

Try to set DEFAULT_LOG in your settings.py

if DEBUG or not os.path.exists('/dev/log'):
    DEFAULT_LOG = 'console'
else:
    DEFAULT_LOG = 'syslog'

0👍

I have also seen this error when syslog service itself is not running.
Running sudo service syslog-ng start for me solved the problem.

Leave a comment