Short logs

Since updating to a few days ago I've lost a lot of log history. I know that before the update I was able to look at log history back a day or 2 at least. Today I have nothing before 0320 this morning and I'm pretty sure is was limited yesterday too but I didn't look into it then.

Past logs have a size limit. They purge old logs automatically when full

Understood, but they are nowhere near as long as they were before the update. I also did a full reset, for other reasons, and the size of the nightly backup I do at 0400 had climbed to 1.1MB and now it's less than a third of that so I'M pretty sure there is plenty of room for logs.

I just remembered that I also scheduled a zwave repair (cron job on another box) for 0300 because that was the reason for the full reset. I have now turned off the zwave repair and I'll know tomorrow if it made a difference.

Might be that you had the debug logs turned on before. Right after you install devices the debug will be on automatically and then turn off a half hour later.

1 Like

I'm not seeing the relevance here. The log history is limited to 0320 this morning and there is no debug info in the available listings, as there shouldn't be.

I have the same issue. Today for some reason a rule didn't do what it was supposed to. So I look in the past logs only to find nothing there because it's limited to about 1000 lines or so.

The limit on past logs is size-based, not time-based. Specifically, it is 256 KB. This would pale in comparison to the size of your database backup, which I'm not even sure includes logs and is not a good indicator in any case (event history pruning and other maintenance tasks get performed every night in the early AM and may affect this size).

There were no documented changes to this in 2.1.9, and it's unlikely that there were any secret changes, either (they normally say something). So, if you're noticing that they aren't going as far back as they used to, the most likely explanation is that one device or app in your logs is particularly chatty (some "Dashboard tile aggregator"-stlye apps are like this, as are some community apps and drivers that don't follow Hubitat's convention of automatically disabling debug logging shortly after enabling it or adding the device).

That being said, it's possible they accidentally changed something here. I just checked a few of my hubs: my C-3 has about 96 KB of logs (if I copy and paste the text only and count characters/bytes; not sure what else Hubitat may store here) for about 1200 lines, about an hour of history. That hub is particularly chatty, so this doesn't seem too unreasonable, but it's still barely half as much as the others. MyC-5 ZHA/lighting hub has about 160 KB of text, totaling over 2000 lines and going back about 5 hors (this one just has info logging enabled and I'm careful about the devices and apps I use on it). A C-4 I only use for testing and development has about the same size and lines, except it's over 10 days on that thing. :slight_smile:

So, in my casual observing: there does seem to be some discrepancy here. I'm not sure if it's 2.1.9-related since I rarely check past logs back more than a few minutes (usually when I just noticed something odd or meant to have live logs open to intentionally test something but didn't), and it's possible it's always been this way. And again, it's not uniformly affecting everywhere I looked.

Good data points there, thanks.

I just loaded my logs from 0320 today (11 hours ago) into a text editor and I have 2937 lines for a bit less than 199KB.

I'll see tomorrow if my zwave repair made any difference though I can't see how it would.

I thought you were saying that the individual logs were not as long as they were, not that the entire log was short.

I apologize if it wasn't clear that I'm talking total log history available when clicking "Show Past Logs" is available, by the way. :wink:
Not that it is related, but just an info. :slight_smile:

Roger that, RogerThat.

1 Like

I put a hold on my cron job that does the zwave repair at 0300 and this morning I find that my log history goes back about 24 hours.

I'll watch it throughout the day and see if it drops off older entries as time passes.

I'm also letting my zwave repair job run at 0300 again to see if that has the log truncation effect.

The zwave repair had no effect so that was purely coincidental. The largest I saw the log history was a bit less than 200KB. Overnight it got pruned to about 110KB. I'll let the issue go. Thanks to all who commented.