oslog

Solid

Read, stream, and analyze Apple unified logs (OSLog) for iOS/macOS apps. Auto-detects subsystem from Logger usage or bundle identifier. Supports live log show, real-time streaming, and .logarchive analysis with full predicate reference. Use when the user asks to check app logs, stream console output, debug with OSLog, or analyze .logarchive files on iOS/macOS.

AI & Automation 36 stars 3 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
52
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# oslog Read, stream, and analyze Apple unified logs for iOS/macOS apps. ## When to Use Activate when the user asks to: - Check, read, show, or debug app logs - Stream logs in real time - Analyze `.logarchive` files - Filter system logs by process, subsystem, or message content - Investigate crashes, errors, or unexpected behavior via logs ## Step 1 — Detect Subsystem Auto-detect the OSLog subsystem from the project. Try these sources in order: 1. **Source code** — search for `Logger(subsystem:` in Swift files to find the actual subsystem string used in code 2. **`project.pbxproj`** — fall back to `PRODUCT_BUNDLE_IDENTIFIER` build setting (common convention is to use bundle ID as subsystem) 3. **`Info.plist`** — read `CFBundleIdentifier` value (resolve `$(PRODUCT_BUNDLE_IDENTIFIER)` if needed) 4. **Ask the user** — if all detection fails, ask for the subsystem string Store the detected subsystem for reuse within the session. ## Step 2 — Determine Mode ### Mode A: Show Recent Logs Query recent logs from the live system log store. ```bash /usr/bin/log show --last <N>m --info --debug --no-pager \ --predicate 'subsystem == "<SUBSYSTEM>"' | head -100 ``` - Default to `--last 5m`, adjust based on user request - Always pipe through `head` on first query to avoid flooding output - Increase `head` limit or remove it only if the user asks for more ### Mode B: Stream Live Logs Stream logs in real time from a running app. ```bash /usr/bin/log stream --info --debug \ --...

Details

Author
artemnovichkov
Repository
artemnovichkov/skills
Created
10 months ago
Last Updated
4 days ago
Language
HTML
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

oslog-logger-defaults

Set up logging for an Apple-platform Swift app with `os.Logger` and decide its `subsystem` / `category` naming and `privacy:` interpolation. Use when choosing a logging library (`os.Logger` vs swift-log `import Logging` vs CocoaLumberjack); when writing the first `Logger(subsystem:category:)`; when deciding `.private` vs `.public` for a value; when asked what `.private` hides in Console.app, sysdiagnose, or `OSLogStore`. Does NOT cover `os_signpost` / Instruments profiling (ios-performance-engineering) or fanning logs out to trackers (telemetry-facade-pattern).

19 Updated today
wei18
DevOps & Infrastructure Listed

observability

Writes and reviews Swift observability code on Apple platforms - unified logging (Logger, OSLog, privacy redaction, log levels and persistence), signposts and Instruments, activity tracing, MetricKit metrics and diagnostics (launch, hangs, crashes, OOM, disk writes), crash reports and symbolication, OSLogStore log export, Xcode Organizer, and shipping telemetry to your own backend or third-party SDKs. Use when adding logging, instrumenting performance, wiring MetricKit, diagnosing production crashes or hangs, exporting logs for support, or choosing between print, Logger, signposts, and analytics SDKs.

5 Updated 3 days ago
n0an
AI & Automation Listed

swift-logging-pro

Reviews Swift logging code using os.Logger for correct privacy markers, subsystem/category conventions, and appropriate log levels. Use when writing or reviewing logging code.

6 Updated yesterday
kelvinkosbab