logging-setup

Generate OSLog-based AppLogger infrastructure with categorized loggers and privacy annotations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates a structured logging infrastructure using os.log/Logger to replace ad-hoc print() statements, enabling robust debugging, privacy controls, and better Console.app integration.

Core Features & Use Cases

  • Scaffolds a centralized AppLogger with categorized loggers (General, Network, Auth, Data, UI) for consistent usage across the codebase.
  • Guides privacy annotations and OSLog usage to respect user data privacy in logs and provide guidance for Console.app filtering.
  • Includes migration guidance to replace existing print() statements with structured logger calls and a template-based AppLogger.swift generated from templates.

Quick Start

Use the generator to scaffold AppLogger.swift and the OSLog-based logging infrastructure across your project.

Frequently Asked Questions about logging-setup

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

FAQPage Schema
How do I set up structured OSLog logging in my iOS app?

To set up structured OSLog logging, you scaffold a centralized AppLogger with categorized loggers for General, Network, Auth, Data, and UI. This provides consistent, privacy-aware logging across your codebase.

What's the best way to replace print statements with a privacy-aware logger in Swift?

The best way to replace print statements is migrating to a template-based AppLogger using OSLog/Logger. This enforces privacy annotations and categorizes logs to respect user data while improving debuggability.

How does OSLog privacy annotation work for sensitive user data in macOS apps?

OSLog privacy annotations mark log parameters as private or public, ensuring sensitive user data is redacted in production logs. The logging setup guides applying these annotations to respect user privacy.

Can I filter categorized OSLog output in Console.app for debugging?

Yes, you can filter categorized OSLog output in Console.app. The logging infrastructure uses defined categories like Network and Auth, providing specific guidance for filtering these categories within Console.app.

Does this structured logging setup work for both iOS and macOS development workflows?

Yes, the structured logging setup works for both iOS and macOS. It automates a privacy-aware OSLog framework suitable for mobile app development workflows from development to production environments.