unified log - archive contains partial or missing metadata

macos10.13.4


Running a query from the command line like:

log show --last 1d

Normally works well enough, but today it is is responding:

log: warning: The log archive contains partial or missing metadata

log: cannot use --last when archive metadata is missing


How do I go about repairing the log so that it works again?

Note: As the machine is in a production enviroment then testing a reboot will have to wait for a day or two.


As I temporary workaround I observe that 'log show' works, so in theory I could just run the entire log through something like awk to extract the time range of interest.

Accepted Reply

sudo log erase --all

Replies

Reboot has not repaired the log.

sudo log erase --all