homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
https://homebridge.io
MIT License
2.61k stars 369 forks source link

Homebridge.log file size #2098

Closed n8r0n closed 2 days ago

n8r0n commented 1 month ago

Current Situation

I am trying to understand what governs the size of the homebridge log file, found on my RPi system at /var/lib/homebridge/homebridge.log.

Currently, the log is holding a fairly small amount of information. Less than one week of data, and less than 1 MB. This is not allowing me to debug problems that span longer than this time.

I am familiar with linux logrotate, and see no such configuration that would cause an external agent to trim the homebridge log.

Is homebridge itself limiting its log file size, and can I adjust that size with a configuration parameter somehow?

NB: in years past, I've certainly had homebridge installations with log files greatly exceeding this length, so I'm not sure what has changed.

Logs

[n/a]

Configuration

{
    "bridge": {
        "name": "Homebridge 12AB",
        "username": "0A:5B:4E:12:23:34",
        "port": 54321,
        "pin": "123-45-678",
        "bind": [
            "eth0"
        ]
    },
    "accessories": [

Environment

Process Supervisor

systemd

Additional Context

No response

NorthernMan54 commented 1 month ago

FYI - There are no configuration options for log file size or rotation period. The current logic is here https://github.com/homebridge/homebridge-config-ui-x/blob/00705fb92e5b3d5b3c6b0b89d9ab73ce8b4b4975/src/bin/hb-service.ts#L326

mkz212 commented 4 weeks ago

+1

I also think that! The log is definitely too short. Especially if a plugin has failures and fills the log with errors, it can much shorten the log.

I think there should be a log from each day separately, not one log that is overwritten.

tjenkinson commented 3 days ago

I opened a PR to make the log size configurable here: https://github.com/homebridge/homebridge-config-ui-x/pull/2161