ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
610 stars 140 forks source link

Logs in Daemon Mode #139

Open broyuken opened 3 years ago

broyuken commented 3 years ago

Hello,

I have this running in daemon mode, but wanted to know how I could see logs in this mode since they aren't output to the console. I didn't see a log file in the /opt/miflora-mqtt-daemon directory

ThomDietrich commented 3 years ago

Hey @broyuken, You can see some logging via sudo systemctl status miflora.service If you are interested in the full log you can write it to syslog or any other facility. You should get what you are asking for by uncommenting the two lines here:

https://github.com/ThomDietrich/miflora-mqtt-daemon/blob/75519a227c2d325f2bcc6726edbe4c8eeca5e86a/template.service#L14

thicknesss commented 2 months ago

In the newer versions of Openhabian (based on Debian 12) syslog is depreciated and journal is standard. This brings up this warning: /etc/systemd/system/miflora.service:13: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.