I am surprised by the high number of log entries during an ongoing activity.
In the log for e.g. the “Radio” activity there are entries “Standby mode is inhibited by: [“Active activity ‘Radio’”]” every second. Same for each other running activity.
Why is there one entry every second? In my opinion, that puts a strain on the battery as well.
Here’s the part of the Log:
That’s the normal behavior if there is anything that prevents the remote from going into sleep mode like an open web configurator tab or a running prevent sleep activity.
I doubt these message have any significant effect on the battery. The remote needs to check if the process is still running anyway.
Okay, but the setting determining whether the remote should switch to sleep mode is something that only needs to be checked once when an activity starts. If that setting changes, the remote can be notified of the change. There is no need to check whether the setting has changed once every second.
If these entries are logged every second while an activity is running, that—in my opinion—does have an impact on the battery.
Standby can also be inhibited by other factors so there has to be a process that regularly checks for this.
You could argue wether these messages should be logged at notice/info level. Maybe only if an inhibitor was removed or added and all others as debug.
Checking regularly is perfectly fine.
But that doesn’t need to show up in the log every single second. If the check reveals discrepancies or errors, then that goes in the log. But in my opinion, the normal case doesn’t belong there; it just unnecessarily bloats the log.
That’s why I suggested moving the repeated entries into the debug log.
Fair enough, but why do these entries need to be recorded in the first place? They don’t help anyone.
If I start the “Watching TV” activity at 8:00 PM and end it after 4 hours, I have 14,400 entries (one each second) in the log. To see the start and end of the activity in the log, I have to select at least 15,000 entries. However, the maximum output is limited to 10,000.
That is why I believe these entries shouldn’t be written to the log at all.
I suspect each entry is created when the remote checks all inhibitors. For debug log level it’s completely normal to log every progress. You can still filter the log before downloading to only show higher level messages. Debug logs are for developers and not end users.
Anyway, I think the developers should reconsider this point.
So, your proposal to move these entries to the debug log stands. Will you take charge of getting that implemented?
I‘m not working for UC. Feel free the create a feature request on GitHub.