logging-setup
Generates structured logging infrastructure using os.log/Logger to replace print() statements. Use when user wants to add proper logging, replace print statements, or set up app logging.
npx skills add rshankras/claude-code-apple-skills --skill logging-setup --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Logging Setup Generator Replace print() statements with Apple's structured logging system (os.log/Logger) for better debugging, privacy controls, and Console.app integration. ## When This Skill Activates Use this skill when the user: - Asks to "add logging" or "set up logging" - Wants to "replace print statements" - Mentions "os.log", "Logger", or "structured logging" - Asks about "debug logging" or "production logging" - Wants to audit print() usage in their codebase ## Why Logger Over print() | print() | Logger | |---------|--------| | Always executes | Debug logs compiled out in Release | | No filtering | Filter by subsystem/category in Console.app | | No privacy | .private, .public, .sensitive annotations | | String interpolation always runs | Deferred evaluation (performance) | | Not in Console.app | Full system integration | ## Pre-Generation Checks ### 1. Project Context Detection - [ ] Check deployment target (Logger requires iOS 14+ / macOS 11+) - [ ] Search for existing Logger/os.log usage - [ ] Identify source file locations (Sources/, App/, etc.) ### 2. Conflict Detection Search for existing logging: ``` Glob: **/*Logger*.swift Grep: "import OSLog" or "os_log" ``` If
- When This Skill Activates
- Why Logger Over print()
- Pre-Generation Checks
- 1. Project Context Detection
- 2. Conflict Detection
- Modes of Operation
- Mode 1: Audit
- Mode 2: Generate
- Mode 3: Migrate
- Configuration Questions
- Generation Process
- Step 1: Create AppLogger.swift
- Step 2: Determine File Location
- Step 3: Provide Migration Guidance
What does the logging-setup skill do?
Generates structured logging infrastructure using os.log/Logger to replace print() statements. Use when user wants to add proper logging, replace print statements, or set up app logging.
How do I install it?
Run `npx skills add rshankras/claude-code-apple-skills --skill logging-setup --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From rshankras/claude-code-apple-skills, a repository with 589 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
