Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

View Mac System Log: A Complete Guide

· 4 min read · Home Tech

In this article
  1. What Are Mac System Logs?
  2. Using the Console App
  3. Using the log Command in Terminal
  4. Understanding Log Levels and Formats
  5. Common Problems and How to Solve Them
  6. Comparing Console and log Command
  7. Safety and Privacy Considerations
  8. Frequently Asked Questions

To view the Mac system log, open the Console app (found in /Applications/Utilities/), which displays logs from the system, apps, and services in real time. You can also use the log command in Terminal for more targeted queries. This guide explains both methods, how to filter logs, common use cases, and troubleshooting tips.

What Are Mac System Logs?

Mac system logs are records of events generated by the operating system, kernel, drivers, apps, and services. They include timestamps, process names, message levels (error, fault, info), and the actual log message. Logs are used for debugging, monitoring system health, and investigating crashes or performance issues. macOS stores logs in a structured format (unified logging) that can be queried efficiently.

Using the Console App

The Console app is the primary graphical interface for viewing logs. To open it, go to Applications → Utilities → Console or use Spotlight (Cmd+Space) and type “Console”. Once open, you’ll see a sidebar with devices (your Mac) and log categories. The main window shows live log entries. You can pause streaming by clicking the pause button. To search, use the search field in the toolbar. For example, type error to see only errors, or type a specific process name like kernel.

To view logs from a specific time period, use the “Time & Date” filter in the toolbar. You can also save a log selection as a bookmark for quick access. The Console app is best for interactive exploration and when you want to see logs in a readable format with graphical filters.

Using the log Command in Terminal

For more advanced or scriptable log access, the log command is powerful. Here are common uses:

  • log show --last 1h – Show logs from the last hour.
  • log show --predicate 'process == "kernel"' – Show only kernel logs.
  • log stream – Stream logs in real time.
  • log show --start "2025-01-01 00:00:00" --end "2025-01-01 12:00:00" – Show logs between specific dates.

The --predicate option allows complex filtering using properties like eventMessage, process, senderImagePath, and level. For instance, to see all errors from any process: log show --predicate 'messageType == error'. To export logs to a file: log show --last 1d > ~/Desktop/logs.txt.

Understanding Log Levels and Formats

macOS unified logging uses levels: default, info, debug, error, and fault. The Console app shows these with color coding: error (red), fault (red with a star), info (blue), debug (gray). The log command can filter by level using --level (e.g., --level error). Log messages include a timestamp, process ID, thread ID, and the message. For example: 2025-01-01 12:00:00.123456+0000 MyApp[123:456] Error: Something failed. The numbers in brackets are PID and thread ID, useful for correlating with other logs.

Common Problems and How to Solve Them

If you can’t see logs, ensure you have admin privileges. Some logs are private and require sudo log show to view. Also, the Console app might not show all logs by default; go to Action → Include Info Messages and Include Debug Messages to see more. If logs are missing, check if the system has been rebooted recently – logs are stored in memory and on disk, but some are purged after a reboot. For persistent issues, try resetting the log store (but be careful: this deletes all logs). To do that, use sudo log erase (not recommended unless necessary).

Comparing Console and log Command

The Console app is user-friendly and great for visual inspection, but it can be slow with large log volumes. The log command is faster, scriptable, and allows precise filtering. For troubleshooting a specific issue, use the log command with a predicate. For general browsing, Console is easier. Both show the same underlying data, but the command line gives more control over output format (e.g., JSON output with --style json).

Safety and Privacy Considerations

Logs may contain sensitive information like file paths, usernames, or even partial data from apps. Be cautious when sharing logs publicly – redact personal information. Also, some logs are protected and require admin access; don’t attempt to bypass security. Using sudo is fine for viewing, but avoid modifying log files. The log store is managed by the system; deleting logs manually can cause issues. Always use the intended commands to manage logs.

Frequently Asked Questions

How do I see crash logs on my Mac?

Crash logs are in ~/Library/Logs/DiagnosticReports and can be viewed in Console under “Crash Reports”. You can also use log show --predicate 'eventMessage CONTAINS "crash"'.

Why is my Mac log so large?

Logs can grow quickly due to verbose apps or system errors. You can clear logs by restarting the Mac, but they will regenerate. To reduce size, you can disable debug logging for specific apps via the log config command.

Can I view logs from another Mac?

Yes, if you have network access, you can use the Console app’s “Devices” sidebar to select a remote Mac, or use log show with the --device option. This requires the remote Mac to have logging enabled.

How do I filter logs by a specific app?

In Console, use the search field with the app name, or in Terminal: log show --predicate 'process == "AppName"'.

What does “private” mean in log messages?

Some log messages are marked as private and are hidden by default to protect user data. To view them, you need to enable “Include Private Data” in Console’s settings or use sudo log show --info --debug in Terminal.