Closed farstreet closed 7 years ago
Hi @farstreet Jurgen!
At the moment I haven't implemented journalctl
-logging yet.
Have you added something to the com.homebridge.server.plist
?
But yes in theory the standard logging works as follows (because Homebridge doesn't support it by itself 👎 ):
So the fact that is important is the pipe to a file, not quite sure how to do that in the *.plist
-file but I am pretty sure, that macOS is supporting logs for launchctl
.
I'll have a look at it and I'll keep you posted for updates!
They might actually not anymore. Seems like I'll have to go for another service that loads Homebridge automatically at boot or when the process gets killed for whatever reason.
Anything you suggest? Preferably documented somewhere as I realized how far away the stuff I learned in school is in my memory now.
Another option might be to use an Automator program! Just:
Execute Shell Script
andTo copy-paste you can use:
export PATH=$PATH:/usr/local/bin/
/usr/local/bin/homebridge -D -U ~/.homebridge > ~/.homebridge/output.log 2>&1 &
Finally add the ~/.homebridge/output.log
to homebridge's config.json
.
Then you could add this new Automator program to your accounts login-items and it will automatically launch on every login :)
That is not as convenient in case of an automatic restart in any case of error, but in my opinion the error should always be investigated instead of ignored ;)
Looks good. Trying it tonight :)
how to configure with journalctl?
@ageorgios See https://github.com/gismo141/homebridge-server/wiki/Usage#systemd on how to configure the plugin to use the journalctl-produced-log.
@farstreet I've now found a way to log with launchd
!
See my hints at: https://github.com/gismo141/homebridge-server/wiki/Usage#launchd Please post here if you have any further questions about this topic.
I'll try it. Thanks for the update!
I cannot load the log file through the webpage. /showLog eventually times out.
At first I thought I just had to specify a logfile path and location for the homebridge-server plugin, afterwards I realized that I was maybe supposed to link to the actual log file of homebridge. But when I then tried to find how that file should be named, I couldn't find it back. I then tried to look for files that could look like they were the log files, but no luck again neither.
I am running homebridge on OSX, automatically starting it with Launchd as explained on https://github.com/nfarina/homebridge/wiki/Install-Homebridge-on-OSX
Pretty sure it's something stupid, but just can't find it right now...
Thanks, Jurgen