logging-setup

Replaces print() statements with os.log/Logger-based structured logging across iOS and macOS projects.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill logging-setup-jtvaris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-setup
Source: https://github.com/jtvaris/sunday-night-dynasty/tree/main/.agents/skills/generators/logging-setup
Command: npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill logging-setup-jtvaris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Replaces ad-hoc print() statements with a centralized, structured logging system (os.log/Logger) to improve debugging, privacy controls, and production observability.

Core Features & Use Cases

  • Audits codebase to detect legacy print() usage and existing logging patterns.
  • Generates a centralized AppLogger with category-based logging and privacy annotations.
  • Provides migration guidance and templates to convert prints to logger calls across modules.

Quick Start

Run the generator in your project to replace print() statements with the new Logger infrastructure.

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 os.log logging in Swift?

To replace print statements with structured os.log logging, you can audit your codebase for legacy print usage and migrate them to centralized Logger calls. This process enforces category-based logging with privacy annotations for iOS and macOS projects.

What is the best way to set up centralized Apple Logger infrastructure for diagnostics?

Setting up centralized Apple Logger infrastructure involves generating an AppLogger that applies category-based logging and privacy annotations. This improves debugging, privacy controls, and production observability across your iOS and macOS applications.

How does os.log improve privacy controls compared to print() in iOS apps?

os.log improves privacy controls by enforcing privacy annotations on structured log calls, preventing sensitive data from appearing in Console.app. Unlike print(), it categorizes logs so you can filter diagnostics safely during production debugging.

Can I use a structured logging migration workflow for both iOS and macOS projects?

You can migrate to structured logging across both iOS and macOS projects. The generator applies predefined workflow steps like pre-generation checks and mode selection to audit existing patterns and convert legacy prints consistently across modules.

Why should I migrate Swift print statements to Console.app integrated logging?

Migrating Swift print statements to Console.app integrated logging provides structured diagnostics with category-based filtering and privacy annotations. This centralized approach replaces ad-hoc prints to significantly improve production observability and debugging.

Do I need existing dependencies to generate a centralized AppLogger?

You do not need existing dependencies to generate a centralized AppLogger. The generator operates independently to audit your codebase, apply category-based logging, and provide templates for converting legacy prints to structured os.log calls.