How do I find error logs on my Mac?

Error logs on Macs contain useful information for diagnosing problems with apps, services, and the operating system itself. When something goes wrong on your Mac, the error details are recorded in log files that can help you or Apple support troubleshoot the issue.

MacOS and apps create various log files that are saved in different locations on your startup drive. Some logs are easy to access in the Console app, while others are buried deep in the file system. Knowing where to look can help you find the clues you need to resolve crashes, troubleshoot startup issues, and identify why an app or hardware device isn’t working right.

In this guide, we’ll cover the basics of where system and app error logs are located on a Mac, how to view them, and what details to look for.

Common Mac Error Log Locations

There are a few common places on your Mac where you can find logs with details about app or system issues:

Console app

The Console app included with MacOS provides an organized view of many of the logs and lets you search through them. Console can be found in the Utilities folder within your Applications folder.

Some of the key logs viewable in Console include:

  • System – general messages about macOS services
  • Diagnostic and usage messages – details on app hangs, crashes, and usage stats
  • User diagnostic reports – issues automatically submitted to Apple by macOS

Console makes it easy to browse through recent log entries, search for specific keywords or errors, and filter the results by date range, source, and level.

/var/log

This folder Contains many detailed text-based log files for the system, apps, and services. Some examples include:

  • system.log – general kernel and system daemon logs
  • install.log – details on software installation sessions
  • fsck_hfs.log – file system check and repair logs

Viewing logs in /var/log requires using Terminal or a text editor. The log files can be very long, so you’ll need to search or scroll to find relevant entries.

~/Library/Logs

The Logs folder in your user Library folder contains logs created by apps you use. This can help track down crashes, errors, or issues with specific apps.

Some examples include:

  • DiagnosticReports – crash details submitted to Apple
  • cores/kernel* – kernel panic crash logs
  • [Appname] folder – logs from specific apps like Safari, Console, Mail, etc

Other app logs

Many apps create their own log files that can be found in the Application Support or Containers folders within your user Library folder. This is common for apps like web browsers, databases, web apps, and complex software suites.

The log locations vary by app but provide additional troubleshooting information beyond the user-level logs.

How to View Logs in Console App

The Console app in MacOS offers an easy way to look through many of the system and diagnostic logs without digging through files. To view logs in Console:

  1. Open Console – it’s located in Applications > Utilities
  2. Browse the list in the left sidebar to see log categories
  3. Click to select a log source like “Diagnostic and usage messages”
  4. Logs for the selected type will load on the right
  5. Use the timeline at the bottom to filter the date range
  6. Search for keywords using the search box
  7. Click and drag to select a portion of a long log entry
  8. Control-click and choose Copy to copy selected log text
  9. Choose Delete to clear old log entries

This makes it easy to quickly find recent logs for the current user session or search through historical logs for a specific issue.

Useful Console Logs

Some of the most useful log sources in Console include:

  • Diagnostic and usage messages – crashes, hangs, usage details
  • User diagnostic reports – issues automatically submitted to Apple
  • Install – software installation records
  • Security – authorization, certificate, and firewall messages
  • System – kernel, hardware, power management logs

Browse through these categories first when you’re tracking down a problem.

Searching Log Files in Terminal

To access logs stored as files rather than through the Console app, you’ll need to use Terminal and command line tools.

Here are some examples of how to view and search logs from Terminal:

View end of a log file

“`
# Show last 50 lines of install log
tail -n 50 /var/log/install.log
“`

Search for keyword

“`
# Search system log for “error”
grep “error” /var/log/system.log
“`

Search and follow new entries

“`
# Follow auth log and match “fail”
tail -f /var/log/auth.log | grep “fail”
“`

Search by date range

“`
# System log today through yesterday
grep -E “(Oct 1|Sep 30)” /var/log/system.log
“`

This makes it possible to access and search logs that aren’t viewable in the Console app.

What to Look for in Logs

So what exactly should you be looking for when searching through all these logs? Here are some tips on picking out useful error details:

  • Error codes – numbers like “100013” or “0x12345678”
  • Module names – like “com.apple.Photos” or “USBDriver”
  • Exceptions – crash details like “EXC_BAD_ACCESS”
  • Dates & times – when the issue occurred
  • “fatal”,”error”,”fail” – severity keywords
  • Hardware IDs – like “iMac18,3” or “MacBookPro11,5”

Focus on entries that match the timing and nature of the problem you’re trying to diagnose. Error codes and exceptions point to the source of a crash. Details like apps, processes, and hardware IDs indicate what was active or involved.

Use Logs to Troubleshoot Issues

As examples, logs can reveal causes of problems like:

  • App crashes – Exception codes and app names identify the source.
  • Slow performance – System logs record high CPU or disk usage.
  • Startup failures – Kernel panic logs have backtrace details.
  • Installation problems – install.log shows what went wrong.
  • Login issues – auth.log records why a login failed.

Match log details to the timing and symptoms of your issue to pinpoint causes.

How to Reset System Management Controller (SMC)

The System Management Controller (SMC) controls low-level functions like power management, charging, sleep/wake behavior, temperature control, and other hardware.

Resetting the SMC can help resolve issues like:

  • Intermittent system crashes or kernel panics
  • Mac not turning on or sleep/wake problems
  • Battery not charging properly
  • Fans running constantly
  • Lack of power or sleep response
  • Unexplained behaviors or hardware issues

Here are the steps to reset the SMC on different Mac laptop and desktop models:

Reset SMC on MacBooks and 2016+ MacBook Pros

  1. Fully shut down your Mac
  2. Press and hold the left Shift + Control + Option keys and the power button
  3. Keep holding all keys for 10 seconds
  4. Release all keys
  5. Press the power button again to boot up

Reset SMC on 2018+ MacBook Air and Pro

  1. Shut down and unplug power cable
  2. Press and hold the left Shift + Control + Option keys and power button for 10 seconds
  3. Release all keys
  4. Plug in power cable and boot up

Reset SMC on iMac, iMac Pro, Mac Pro

  1. Fully shut down your Mac
  2. Unplug the power cable from back of machine
  3. Press and hold the Mac’s power button for 10 seconds
  4. Release power button, plug in power, and restart

Reset SMC on Mac mini

  1. Shut down Mac mini and unplug all cables
  2. Press and hold power button for 10 seconds
  3. Release, plug cables in, wait 10 seconds
  4. Restart Mac mini

This should fully reset the SMC and resolve any issues caused by power management or hardware miscommunication.

How to Reset NVRAM on a Mac

NVRAM (non-volatile RAM) stores information like display settings, recent kernel panic logs, and other parameters in memory even when powered off. Resetting NVRAM can help fix issues like:

  • No video output
  • Problems with display resolution and colors
  • Startup failure or freezing during boot
  • Kernel panic during boot sequence
  • Issues caused by incorrect NVRAM settings

Here are the steps to reset NVRAM on any Mac:

  1. Fully shut down your Mac
  2. Power on and immediately press Option + Command + P + R keys
  3. Keep holding keys until you hear the startup chime a second time
  4. Release keys and let Mac finish booting up

This resets NVRAM to default settings and can resolve problems caused by corrupt or invalid data.

Common Mac Error Codes and Fixes

Mac logs use a variety of error codes and exceptions to identify specific issues. Here are some examples and possible fixes:

Error Code Problem Fixes
100013 Hard drive I/O error Disk First Aid, reinstall OS
ASRT App crash Update app, reinstall app
DZNErr macOS update failed Retry update, reinstall macOS
SPOD Pointing device error Check mouse/trackpad, SMC reset
SRTT Startup crash Boot into Safe Mode, reinstall OS

Search for the code in your logs to identify the source and then try the recommended fixes.

Conclusion

Error logs on your Mac contain valuable troubleshooting information, but finding them takes some digging. The Console app provides an easy way to access many system, hardware, and usage logs. For other logs, Terminal command line searches are needed.

Focus on critical errors around the time of a crash or issue occurring. Details like codes, module names, hardware IDs, and exceptions help pinpoint the cause. Reset NVRAM and SMC to fix low-level system problems. Keep log searches in mind for any Mac issue that needs a solution.