andrewshilliday / garage-door-controller

Software to monitor and control garage doors via a raspberry pi
MIT License
327 stars 132 forks source link

Log file? #29

Closed theonetmat closed 6 years ago

theonetmat commented 8 years ago

Is there a log file or other place where I can see the history of the door actions?

Thanks for the project. It works great so far.

atljam commented 8 years ago

cat /var/log/syslog | grep garage_controller make sure you use the pipe symbol its shift backslash key

theonetmat commented 8 years ago

Thanks for the idea. I kept looking and did find the syslog and was able to get something similar working. I tried to use a tail-f and then have the grep write to another log file. That does work but only once. What I am doing so far is what I have below. This works but I have to run it manually. I'll eventually have it run maybe once a day to append the new log file. I am not sure what will happen to the file size over time if I keep having it add to the same file.

grep --line-buffered "garage_controller" syslog >> garagedoorlog.txt

andrewshilliday commented 7 years ago

Yup. I put it in syslog out of laziness (and because I really don't know how to do logging correctly in python) If anyone wants to clean that up they should feel free.