mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-22 00:02:25 +00:00
Update cheatsheets
This commit is contained in:
25
osx/log
Normal file
25
osx/log
Normal 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}}`
|
||||
Reference in New Issue
Block a user