Agent skill

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.

rshankrasgithub.com/rshankrasGitHub ↗
claude-codecan modify filesMIT
Install
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.

Facts
Files in the skill folder: 4
SKILL.md size: 4 KB
Bundled scripts: none
Allowed tools: ReadWriteEditGlobGrepBashAskUserQuestion
Path: skills/generators/logging-setup/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 589
Language: Swift

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When This Skill Activates
  2. Why Logger Over print()
  3. Pre-Generation Checks
  4. 1. Project Context Detection
  5. 2. Conflict Detection
  6. Modes of Operation
  7. Mode 1: Audit
  8. Mode 2: Generate
  9. Mode 3: Migrate
  10. Configuration Questions
  11. Generation Process
  12. Step 1: Create AppLogger.swift
  13. Step 2: Determine File Location
  14. Step 3: Provide Migration Guidance
Ships with 3 files
  • logger-patterns.md
  • migration-guide.md
  • templates/AppLogger.swift
More from claude-code-apple-skills
All skills →
About this skill
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.

Keep going