Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

25
osx/log Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, osx]
source: https://github.com/tldr-pages/tldr.git
---
# log
> View, export, and configure logging systems.
> More information: <https://keith.github.io/xcode-man-pages/log.1.html>.
- 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}}`