Cast your mind back to El Capitan. Which important utility (bundled with macOS) did you use then, but almost never use today? Could it be Console, the log browser? Last Sunday, I wrote about the tools and fundamentals which Apple needs to get right in macOS 10.16, and at the end mentioned the case of Console, the vital tool that Apple abandoned when it introduced the unified log in Sierra.
Logs and their browsers are humdrum, everyday tools which are as sexy as soupkitchens and as essential as sleep. Deprived of them, advanced users, sysadmins and developers alike struggle blindfolded in the dark. That app just crashed? What caused your kernel panic? What went wrong at two o’clock in the morning? Over the more than thirty years that I’ve been writing Q&A pages for Mac magazines, I’ve lost count of the number of times that I’ve asked users to look in their log, or to send me log extracts so I can try to work out what went wrong.
Here’s what I wrote in MacUser in 2014:
“When something goes wrong with your Mac, the best clues are usually found in the log. Are you scared to open Console, or panic when you scroll through its contents?
Much may be hidden behind OS X’s friendly Finder and other front-end refinements, but when you need to trace and diagnose a problem, you should turn to Console and the riches of its logs. Whether it is an application that keeps unexpectedly quitting, or bouts of the spinning beachball, many mysteries can be solved when you spend a little time browsing contemporaneous log entries.”
Then in 2016, with the release of Sierra, Apple changed to its new unified log. In principle, this was a big step forward. Rather than a simple stream of timestamped text, the log is now structured data which has gone on to include activities and signposts, so developers can analyse performance and get to grips with non-debug versions of their software running on user systems, and much more.
Opening Console came as a bit of a shock, though. Instead of the traditional view of log entries which had been collected, we are presented with a window on a live stream. So how to look at an event which happened a couple of minutes ago, or last night? Some users even thought that logs were no longer stored, but ephemeral messages which shot past in Console’s window.
There are two ways in which you can now view existing (historical) entries in the unified log: in Console, create a logarchive file and browse that, or resort to the complexities of the
log command in Terminal.
Even now, Console version 1.1 (with just one minor version increment over four corresponding major releases of macOS) is the most featureless log browser I’ve ever seen. It can’t display all the fields which are saved in log entries, pretends that signposts don’t exist, can’t save anything to a file, and can only copy entries in unstructured format. And that’s but a cursory overview of its thorough impotence.
The tragedy of having to resort to the
log command is that it discards the structured data in log extracts, unless you happen to wire it up to a passing database capable of importing its copious JSON exports. The
log command is another of those basic tools which has been assembled like a patchwork quilt, and for the vast majority of users puts the unified log well out of bounds.
All this would have been excusable, perhaps, if Apple had bothered to document the tracev3 log file format; others have reversed it, but as it’s compressed binary and relies on drawing in data from other sources which are also undocumented, this isn’t easy. Neither has Apple made the
log command open source. Some might see this as a pattern of deliberate obstruction to prevent us from getting more out of our logs.
What makes me most angry at what has happened to the log and Console is that Apple’s concepts and engineering are outstanding: the log has a remarkably low latency, retains a great deal of invaluable data in structured and compact format, and should be an essential resource to anyone who takes their Mac seriously. Instead of building on those unique strengths, Apple has provided token support which must leave even its own engineers wishing for better, as they wade through the logarchives supplied in
Console is the epitome of Apple’s problem with tools and its support for users and other third-parties. It turns what should be an enormous strength of macOS into something that, over the last few years, has become so repellant that most have just given up, and carry on blindfolded and in the dark. That’s exactly what Apple needs to fix.