homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 240 forks source link

Relocate homebridge.log to /homebridge/logs #417

Closed colinbendell closed 2 years ago

colinbendell commented 2 years ago

Fixes #416 (and #350)

This PR relocates the homebridge.log to the /homebridge/logs sub directory. This allows for tmpfs volume mapping for the logs directory to reduce the IO related to logs on systems like RPIs

oznu commented 2 years ago

This will break the Homebridge UI log viewer, and if the Homebridge UI is enabled in the container, no Homebridge logs will be shown in the container logs.

Alternatively you can create a symlink (might need to be hard) from /homebridge/homebridge.log to a file on another mounted volume.

colinbendell commented 2 years ago

This will break the Homebridge UI log viewer, and if the Homebridge UI is enabled in the container, no Homebridge logs will be shown in the container logs.

Alternatively you can create a symlink (might need to be hard) from /homebridge/homebridge.log to a file on another mounted volume.

Why do you say this will break the log viewer? I have been running this patch for several months and use the logs regularly. I introduced this patch because of the IO thrash this was creating on my dietpi distro.

Can you provide more direction?

colinbendell commented 2 years ago

This will break the Homebridge UI log viewer, and if the Homebridge UI is enabled in the container, no Homebridge logs will be shown in the container logs.

Further, @oznu, if you looked at the PR, line 31 of root/etc/services.d/homebridge/run specificallly addresses the concern you have here.