Closed jrrios closed 2 years ago
This is a docker configuration. See https://stackoverflow.com/a/52927765
If using compose, add this:
logging:
driver: "json-file"
options:
max-size: "10m"
eg.
version: '2'
services:
homebridge:
image: oznu/homebridge:ubuntu
restart: always
network_mode: host
environment:
- PGID=1000
- PUID=1000
- HOMEBRIDGE_CONFIG_UI=1
- HOMEBRIDGE_CONFIG_UI_PORT=8581
- TZ=Australia/Canberra
volumes:
- ./volumes/homebridge:/homebridge
logging:
driver: "json-file"
options:
max-size: "10m"
Remember to run docker-compose up -d
after making any changes to the compose file.
If you're not using docker-compose, see the docs:
https://docs.docker.com/config/containers/logging/local/#usage
The log file under
/var/lib/docker/containers/<container_id>/<container_id>-json.log
grows without stopping. It got to be as large as 88GB in my system and there's no obvious way to modify the logging behavior on the UI.