View, export, and configure logging systems. More information: https://keith.github.io/xcode-man-pages/log.1.html.
log stream
syslog
from the process with a specific PID:log stream --process process_id
log show --predicate "process == 'process_name'"
sudo log collect --last 1h --output path/to/file.logarchive