logging-setup

Generate a centralized AppLogger.swift with os.log/Logger for Swift apps.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/mazicimert/RunDom --skill logging-setup-mazicimert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-setup
Source: https://github.com/mazicimert/RunDom/tree/main/.claude/skills/generators/logging-setup
Command: npx skills add https://github.com/mazicimert/RunDom --skill logging-setup-mazicimert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Replaces ad-hoc print-based debugging with a structured OSLog/Logger system, enabling private data protection and production-ready diagnostics.

Core Features & Use Cases

  • Generates a centralized AppLogger wrapper and configures the subsystem from Bundle.main.bundleIdentifier
  • Supports audit, generate, and migrate modes to detect print usage, build the logging infrastructure, or convert existing logs
  • Provides privacy annotations, integration guidance with Console.app, and guidance on performance optimizations

Quick Start

Run the generator to produce AppLogger.swift and migrate existing prints to AppLogger usage.

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, generate a centralized AppLogger wrapper using os.log/Logger. This infrastructure enforces privacy-aware annotations and enables production-ready diagnostics across iOS/macOS modules.

What is the best way to configure OSLog subsystems for iOS apps?

The best way to configure OSLog subsystems for iOS apps is by deriving the subsystem identifier from Bundle.main.bundleIdentifier. This ensures logs are correctly scoped and filterable within Console.app.

How does privacy-aware logging work with the Swift Logger API?

Privacy-aware logging with the Swift Logger API works by applying privacy annotations to log parameters. This ensures sensitive user data is redacted in production while remaining visible during local debugging.

Can I automatically migrate existing print statements to a Swift Logger?

Yes, you can automatically migrate existing print statements to a Swift Logger using a migrate workflow. This converts ad-hoc print-based debugging into structured AppLogger calls throughout your project modules.

How do I audit my Swift project for print usage before switching to OSLog?

You can audit your Swift project for print usage before switching to OSLog by running a specialized audit mode. This detects all ad-hoc print-based debugging instances to assess the migration scope.

Does centralized logging with AppLogger work across multiple iOS modules?

Yes, centralized logging with AppLogger works across multiple iOS modules by providing a single shared logging infrastructure. This standardizes OSLog usage and subsystem configuration throughout the entire application.