A simple question: how long does macOS Sierra retain entries in its new log?
Inevitably, the answer isn’t as simple as the question. This new log uses two stores: one in memory, the other on your startup volume and so on disk.
That held in memory is supposed to hold every log entry for a period of minutes, perhaps up to an hour at the very most.
Normally, log entries at Info and Debug levels are not written to disk, only held in memory. As the memory store rolls over, those log entries are lost, leaving just those at Default level and above in the disk store.
Unlike the previous Unix-style logs, old logs are not compressed and rolled over, eventually being removed altogether during daily system housekeeping. The whole log is stored in compressed format, and most probably purged to maintain a steady size, rather than purely by date.
A quick check here shows that, at almost noon on 21 March, I was able to retrieve Default log entries going back to 1600 on 18 March, a period of 67 hours. I think it’s reasonable to expect Sierra’s new log to be able to retrieve entries up to 2 to 3 days old, but it is unlikely that you will be able to access any earlier than that.
So the answer depends on the level assigned to the log entry:
- for Debug entries, they’re held in memory only, when Debug logging is enabled, and kept for minutes,
- for Info entries, they’re held in memory too, and kept for minutes,
- for Default (most common), Error, and Fault, they’re held on disk for 2-3 days or so.