Query macOS unified logging (one-shot)
logShowLook back at recent app logs with NSPredicate or process/subsystem filters to debug issues without leaving chat.
Instructions
[mg.log] Wrap log show --style compact --last <window> with optional NSPredicate filter, process and subsystem sugar. Returns parsed entries (timestamp, type, process, pid, subsystem, category, message) bounded by maxEntries. Use this to look back at app logs without leaving chat.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| last | No | Time window to look back from now (e.g. "30s", "5m", "1h", "2d"). Default 5m. | 5m |
| predicate | No | NSPredicate-style filter passed to `log show --predicate`. Examples: `process == "DemoApp"`, `subsystem == "com.example.app"`, `messageType == error`. | |
| process | No | Filter to a single process name. Sugar over `--predicate process == "<name>"`. | |
| subsystem | No | Filter to a single subsystem identifier. | |
| level | No | Minimum log level. `default` = default+error+fault. `info` adds info-level. `debug` adds info+debug. | default |
| maxEntries | No | Cap on parsed entries returned (default 500). Output is truncated to the first N matching. |