How to check if something was written to /dev/log?
6,591
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
Related videos on Youtube
Comments
-
wasd over 1 year
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
-
Sylvain Pineau almost 8 yearsOn Ubuntu syslog file is
/var/log/syslog
. Do you need to check if something new has been logged to it from another python script?
-
-
wasd almost 8 yearsAha, so I need to specify address as '/dev/log/' but to see if something was logged I need to check /var/log/syslog!