macOS

log

SafeQuery unified logs

log show --last 1h --predicate '...'

Queries the unified log; --predicate filters by process/subsystem; stream follows live.

Examples

  • log show --last 30m --predicate 'process == "WindowServer"'Logs for one process

Syntax

log show [--last 1h] [--predicate 'expr'] / log stream

Before you run it

Read only.

Used when you see

Mac running slow
1
Scan unified logs for repeated errors
See the whole flow →
Mac won't sleep (or wakes up)
3
Find wake reasons in the logs
See the whole flow →
Time Machine backup fails
3
Look for backupd errors in unified logsFilter on process == "backupd".
See the whole flow →

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store