From cac13976b0f8e8b74912f83c523eff0fb03f100f Mon Sep 17 00:00:00 2001 From: James Childers Date: Tue, 7 Sep 2021 15:35:14 -0500 Subject: [PATCH] log: add page (#6316) --- pages/osx/log.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/osx/log.md diff --git a/pages/osx/log.md b/pages/osx/log.md new file mode 100644 index 0000000000..cd420e46f8 --- /dev/null +++ b/pages/osx/log.md @@ -0,0 +1,20 @@ +# log + +> View, export, and configure logging systems. +> More information: . + +- Stream live system logs: + +`log stream` + +- Stream logs sent to `syslog` from the process with a specific PID: + +`log stream --process {{process_id}}` + +- Show logs sent to syslog from a process with a specific name: + +`log show --predicate "process == '{{process_name}}'"` + +- Export all logs to disk for the past hour: + +`sudo log collect --last {{1h}} --output {{path/to/file.logarchive}}`