Closed vongohren closed 9 years ago
forever-service overrides the log option and stores all logs in /var/log/{service}.log (in this case /var/log/serialReader.log) file hence specifying -l will not work. Logrotate script is also automatically set to rotate this log file.
I am not sure on -w and --watchDirectory together, I think I picked up example from somewhere and I have been able to successfully use it in my project so haven't tried to further investigate that.
Ok but you are using it together? I usually just use -w when i launch forever from the directory im in. But how does that work when you use the service? Does it launch from /etc/init.d/ folder?
forever-service will change to the same directory from which you run forever-service install cmd before invoking forever command, so if -w works from that directory it should work.
-w works, but how would .foreverignore work? Since it runs from same folder and all it works normally?
Hi im trying to add forever log options in my forever options. But it seems to not be working.
This is my install line:
sudo forever-service install serialReader --script serialReader.js -f " -watchDirectory /home/pi/Code/arduino-plant-reader -w -l readerLog.log -a"
Also, is there a reason to use both watchDirectory and -w? Wouldnt -w just work alone?