earlier logs in Console of Sierra [duplicate]

In previous versions of OS X the Console.app had buttons to allow you to see earlier or later in the logs.

In Sierra it seems to only show entries from when you start Console.app.

How do you get Console.app to show earlier entries?

e.g. I want to see the logs before my last reboot to see why it hung.


Solution 1:

Short Answer

You can't. Well, at least not yet. That's because Console isn't working with historical data - it's working with live data instead.

What you can do is use the log command in Terminal. However, I have to warn you, there appears to be a lot of 'bugs' in how the log command is working in Sierra. If you’re interested in using this command, refer to Using the logs in Sierra: some practical tips.

[EDIT]

I forgot to mention there is another option available to users. It's a free app called Loglogger. This is a workaround solution provided by Howard Oakley, designed to provide access to Sierra's logs that Console doesn't provide. Obviously, this requires macOS Sierra to run. It's a .zip download and includes a pretty good PDF guide on how to use it.

Note: I have no affiliation whatsoever with the app or Howard Oakley.

Long Answer

One thing that isn't obvious to users is that the version of Console included with macOS Sierra is a totally new beast (i.e. a new app, built from scratch).

Previous versions of Console opened All Messages by default and because of this was a great tool for troubleshooting after the fact (e.g. after a crash you could open Console and refer back to that event and what preceded it).

macOS Sierra's Console just doesn’t work like that. It's live log only runs when Console is open, so if you're trying to discover why your Mac shut down at midnight, it's not going to help you.

So, from a troubleshooting standpoint, the new Console is frustratingly limited. That's not to say it doesn't have some major improvements (such as excellent new Search functionality), but at present it's only really helpful in terms of debugging problems while working in Sierra, but fairly useless if you're wanting to analyse kernel extensions and services. It also provides a range of new tools, but since Console isn't working with historical data, these tools only work with entries captured since Console was launched (great if you're trying to troubleshoot why a specific app crashes whenever you try to perform a specific function, but useless otherwise).

So, what am I saying? Well, Console is a work in progress. I'd go as far as to say it's really a Beta version at present. A lot more functionality will be added as time goes by, but for now we need to be patient.

Solution 2:

You need to first use the log command at the command line to collect the logged messages into a .logarchive bundle, then use Console to view the contents of this bundle. For example:

sudo log collect --last 1d

…will collect all logged messages generated during the past day into a system_logs.logarchive bundle in the current directory. Open this bundle in Console, and you can use the full power of the app to view, search and filter the log data.

Note that log has many other useful applications; I suggest reading the log(1) man page.