Giter Site home page Giter Site logo

Comments (8)

gismo141 avatar gismo141 commented on May 25, 2024

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 👎 ):

  1. I take the normal output to the console,
  2. pipe it to a file,
  3. read the file by the server and
  4. present it to the user on a webpage.

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!

from homebridge-server.

farstreet avatar farstreet commented on May 25, 2024

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.

from homebridge-server.

gismo141 avatar gismo141 commented on May 25, 2024

Another option might be to use an Automator program!
Just:

  1. open Automator.app (preinstalled on every macOS),
  2. create a new program,
  3. Add the Execute Shell Script and
  4. write something like in the picture.

homebridge as automator program

To 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 ;)

from homebridge-server.

farstreet avatar farstreet commented on May 25, 2024

Looks good. Trying it tonight :)

from homebridge-server.

ageorgios avatar ageorgios commented on May 25, 2024

how to configure with journalctl?

from homebridge-server.

gismo141 avatar gismo141 commented on May 25, 2024

@ageorgios See https://github.com/gismo141/homebridge-server/wiki/Usage#systemd on how to configure the plugin to use the journalctl-produced-log.

from homebridge-server.

gismo141 avatar gismo141 commented on May 25, 2024

@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.

from homebridge-server.

farstreet avatar farstreet commented on May 25, 2024

I'll try it. Thanks for the update!

from homebridge-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.