logging-setup

Generate structured os.log/Logger logging infrastructure for Swift projects.

603|51|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill logging-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-setup
Source: https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/generators/logging-setup
Command: npx skills add https://github.com/rshankras/claude-code-apple-skills --skill logging-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill replaces inefficient print() statements with Apple's robust os.log/Logger framework, enabling structured logging for better debugging, privacy control, and integration with Console.app.

Core Features & Use Cases

  • Structured Logging: Implements os.log/Logger for categorized and level-based logging.
  • Privacy Controls: Supports .public, .private, and .sensitive annotations for data security.
  • Migration Assistance: Provides guidance and tools to convert existing print() statements.
  • Use Case: Refactor your app's debugging output from scattered print() calls to a centralized, searchable, and privacy-aware logging system.

Quick Start

Use the logging-setup skill to replace all print statements with structured logging.

Frequently Asked Questions about logging-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace print statements with structured logging in Swift?

To replace print statements with structured logging in Swift, you generate infrastructure using the os.log/Logger framework to establish categories, log levels, and privacy annotations for centralized debugging.

What is the best way to migrate existing print() calls to os.log in a Swift project?

Migrating print() calls to os.log involves auditing existing logging practices and converting scattered debug output into categorized, level-based Logger statements with privacy annotations like .public or .private.

How do os.log privacy controls work for debugging data in Console.app?

os.log privacy controls work by applying .public, .private, or .sensitive annotations to logging variables, ensuring data security while allowing structured debug output to be filtered and searched in Console.app.

Does the Logger framework support categorized logging for different app modules?

Yes, the Logger framework supports categorized logging for different app modules by establishing specific log categories, enabling developers to filter and isolate debugging output for distinct components in Console.app.

Why should I use os.log instead of print statements for Swift debugging?

You should use os.log instead of print statements because it provides structured logging with privacy controls, categorized output, and native Console.app integration, replacing inefficient and unsearchable debug text.