2

I'm writing application which is intended to log to syslog. In documentation for SysLogHandler (python, logging module) it is said that for UNIX systems it's usually '/dev/log'. I need to test if something was written there, how can one read the content of '/dev/log'?

I have Ubuntu 14.04

1
  • On Ubuntu syslog file is /var/log/syslog. Do you need to check if something new has been logged to it from another python script? Aug 30 '16 at 12:27
4

I think handler = SysLogHandler(address='/dev/log')

might be what you are missing. you should find output in /var/log/syslog.

Source: https://stackoverflow.com/questions/3968669/how-to-configure-logging-to-syslog-in-python

1
  • 1
    Aha, so I need to specify address as '/dev/log/' but to see if something was logged I need to check /var/log/syslog!
    – wasd
    Aug 31 '16 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.