You can customize the macOS Console’s log window to change the way it behaves. Here’s how to adjust it for your needs.
macOS’s Console app is a utility that allows you to view system-wide logs, crash reports, diagnostics, and more. By using Console, you can view what has been going on with your Mac in-depth.
One thing Console lets you view are logs. Logs are simply text files that software writes messages to, usually with a timestamp and process name, so you can later go back and see what happened on your computer.
Logs have a long history dating all the way back to the early UNIX days in the 1970s, when programmers began using them to debug UNIX apps. Programmatically, UNIX methods such as log
, syslog
, and others write text output to a log file from within programs.
In macOS, these files are saved locally to several places on your Startup Disk, including:
- /private/var/log
- /private/var/logs
- /Users/~/Library/Logs/
- /Library/Logs
- The user’s home folder (~)
- Application-specifc folders
From time to time, macOS will archive and store old logs by compressing them and appending a .bz2 extension to them. You can safely delete these archives if you like.
Don’t delete critical system logs or any log or folder that is permission-protected, as macOS needs these. Other logs can safely be deleted, but be aware that when you delete a log, its record of what went on is lost forever, and there’s no way to get it back.
Several key log files, such as system.log and install.log, should be kept around just in case.
If you do delete a system log file, macOS will automatically create a new replacement when it needs to, or after the next time you restart your Mac.
Using Console to view logs
Rather than having to dig around in folders to find log files, Apple provides the Console app, which both knows where log files live and how to display them.
To use Console, open it in the /Applications/Utilities folder and click on one of the log categories in the left sidebar. This will display the selected log or logs for that category in the top pane on the right.
If you click a single log file name in the sidebar on the left, its contents will be shown in the pane on the right.
To view the contents of any single log from one of the log categories, select a category in the sidebar first, then select a log file name from the top pane. The selected log’s contents will be displayed in the bottom pane on the right.
You can also locate the selected log file in the Finder by Control-clicking on its name in the sidebar, or in the top pane and selecting Reveal in Finder from the popup menu.
To move a log file to the Trash, select it in the Console window, Control-click on it, then select Move to Trash from the popup menu. This physically moves the log file to the Trash.
If you’re going to delete a log file, it’s best to also Finder->Empty Trash afterwards in the Finder to force macOS to create a new copy of the deleted log file. Be careful which log files you delete, since some of them are in use by macOS.
At the top of the Console’s window is a toolbar containing buttons. There’s also a View menu in the menu bar containing a variety of items. One of the menu items in the View menu lets you customize the toolbar.
While you can view a log’s contents in the bottom pane in the main Console window, you can also double-click any log’s name in the Console window to open its content in a new window:
Each log window also has its own toolbar. You can customize this toolbar by selecting View->Customize Toolbar….
When you do, a sheet is presented showing all possible items you can add to the log window toolbar.
Customizing the log window toolbar is mainly accomplished by dragging items from the sheet to the toolbar, or out of the toolbar to remove them. To remove an existing item from the toolbar, drag it from the toolbar back into the sheet.
Dragging items within the toolbar also reorders them.
You can also set whether to display icons only, or text and icons for each item in the toolbar by making a selection from the Show: popup menu at the bottom of the sheet.
Once you have the log window toolbar just the way you want it, click the Done button to return to the log window. You can also hide or show the log window’s toolbar by selecting View->Hide Toolbar in the menu bar.
There are other window options such as reordering columns, customizing the content view, and using saved searches. See Apple’s page Customize the log window in Console on Mac in the Console User Guide for more info.
The Console is a handy app to have around, and once you know how to customize it to your taste, it’s a lot easier and more enjoyable to use.