logging-setup

logging-setup is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 39 tokens per session (953 once invoked), scanned A, original, MIT.

A setup guide for Apple's structured logging system, Logger, which records app events for debugging and monitoring. It replaces basic print statements with logs that can be filtered and marked for privacy.

In plain words
What is it for?
Use it to replace print statements, add debug or production logging, and organize logs by subsystem and category in Swift apps.
Why use it?
It makes app logs easier to inspect in Apple's Console app and safer to use with sensitive values. It also supports different logging behavior in development and released builds.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the apple-skills plugin — 182 skills shipped together , and of apple-skills

Good fit Use it to replace print statements, add debug or production logging, and organize logs by subsystem and category in Swift apps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/logging-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rshankras/claude-code-apple-skills --skill logging-setup
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 182 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for logging-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/logging-setup/github.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/logging-setup)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/logging-setup"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/logging-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for logging-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/logging-setup"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/logging-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00953
Opus 5.5 $0.00016 $0.00381
Sonnet 5.5 $0.00008 $0.00191
Haiku 4.5 $0.00004 $0.00095

Measured 3mo ago against content hash f6e66f669993, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

logging-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/generators/logging-setup/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 found, ask user:

  • Extend existing logging?
  • Replace with new implementation?
  • Create separate logger?

Modes of Operation

Mode 1: Audit

Find all print() statements and report:

Grep: print\s*\(

Report format:

  • File:line - print statement
  • Severity: Info/Warning/Error (based on context)
  • Suggested Logger level

Mode 2: Generate

Create logging infrastructure from scratch.

Mode 3: Migrate

Convert existing print() to Logger with suggestions.

Configuration Questions

Ask user via AskUserQuestion:

  1. Categories needed?

    • Network, Auth, UI, Data (defaults)
    • Custom categories?
  2. Include migration helpers?

    • Extension on String for quick migration
    • Temporary print-to-log bridge

Generation Process

Step 1: Create AppLogger.swift

Read the full file on GitHub · 142 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 142 lines · 39 tokens per session scan A f6e66f669993

Subscribe to this mod's changes

logging-setup is a skill published in the GitHub repository rshankras/claude-code-apple-skills (927 stars, last pushed 26d ago), licensed MIT. It adds 39 tokens to every session and 953 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

logging-setup compared with skills from other repositories

logging-setup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
logging-setuprshankras/claude-code-apple-skillsSkill92726d agoMITA39Claude Code
ha-logsshiwenwen/hope-agentSkill1.9ktodayMITA183Claude Code, Codex
remove-deadcodecode-yeongyu/oh-my-openagentSkill71ktodaynoneA41Claude Code, Codex
asc-crash-triagerorkai/app-store-connect-cli-skillsSkill1.2k2d agoMITA60Claude Code
smart-exploreFlorianBruniaux/claude-code-pluginsSkill484d agoMITA73Claude Code
warderic-cielo/mofloSkill192d agoMITA0Claude Code
sql-optimization-patternsHermeticOrmus/LibreUIUX-Claude-CodeSkill1152mo agoMITA44Claude Code