LogUI build 65 introduces a Logarchive Tool
Just before the start of WWDC, I released an update to my log browser LogUI adding support for accessing logarchives. I promised that there was more support for logarchives on its way. LogUI 1.0 build 65 dedicates a whole window to them, in its Logarchive Tool.
There are many situations where you can’t access the active log, and you can’t create a logarchive using the log
command tool or a sysdiagnose
. These include:
- When you only have access to the contents of the Mac or device’s storage, particularly in forensics, or following hardware failure.
- When you want access to the logs in a backup. Time Machine backups normally include full log files, for example.
- When you don’t have
ssh
or similar access to a remote Mac. - When the log records may be incomplete or damaged.
Provided that you can copy two folders from the hidden /var/db folder on that Mac or device, LogUI can turn those into a browsable logarchive.
Create a logarchive from folders
On your Mac, create a folder somewhere convenient such as ~/Documents. As this method doesn’t use the log
command, this can be on an external disk if you wish.
From the source Data volume copy the folders at /var/db/diagnostics and /var/db/uuidtext to your folder, so it looks like this.
Open LogUI, and from its Window menu open its Logarchive Tool. This offers you four tools and two checkboxes. Click on the Create Logarchive tool and first select the folder you created, containing the log folders. Then give the new logarchive a suitable name and save it somewhere convenient.
LogUI should then inform you in its window that creation has completed. As this is performed using undocumented code for an undocumented format, it may not always work correctly. If there are any problems, repeat the same with the Debug checkbox ticked, and it will give you a detailed commentary of what it does, which should help you understand what went wrong.
Getting info about a logarchive
The trickiest part of accessing logarchives is knowing what they contain, more specifically the time periods for which they have log records. LogUI’s Logarchive window provides two aids to provide you with that information, in its Catalogue and Analyse tools.
Catalogue simply lists all the tracev3 files in the logarchive, giving the datestamps each was created and last modified, together with the period between those, and the file size.
Leave that open as you browse that logarchive, to guide your way through its entries.
Analyse goes further, in telling you about the entries in each of the persist tracev3 files in the logarchive. It tells you the most common processes that wrote the entries in each of those files, allowing you to hone in on which are of most interest. If you want to extract that information for analysis in a spreadsheet, tick the CSV checkbox and it will be shown ready to import into your favourite spreadsheet.
Finally, to save the contents of the current window as a text file, click on the Save Text tool at the right.
I have now checked LogUI’s compatibility with the first developer beta of Tahoe, and found and fixed one obscure bug in the Logarchive Tool before this new build. LogUI should now be fully compatible with macOS 14.6 and later, including Tahoe. It’s available now from here: logui165
and from its Product Page.
Enjoy!