logging-setup
Skill915 starsChanged 22 days agoMITView on GitHub
Generates structured logging infrastructure using os.log/Logger to replace print() statements. Use when user wants to add proper logging, replace print statements, or set up app logging.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- WhiteMuush/Your-Claude-DevOpstheir own version, first seen Oct 27, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- WhiteMuush/Your-Claude-DevOps★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository184 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-intentsSkill
- foundation-modelsSkill
- apple-intelligenceSkill
- visual-intelligenceSkill
- ad-attributionSkill
- app-description-writerSkill
- apple-search-adsSkill
- iap-finalizerSkill
- keyword-optimizerSkill
- marketing-strategySkill
- originality-checkSkill
- ratings-mechanicsSkill
- rejection-handlerSkill
- review-response-writerSkill
- screenshot-plannerSkill
- app-storeSkill
- web-presenceSkill
- core-mlSkill
- animation-patternsSkill
- design-systemSkill
- game-feelSkill
- liquid-glassSkill
- sf-symbolsSkill
- designSkill
- typographySkill
- ui-prototypingSkill
- ux-writingSkill
- attributed-stringSkill
- foundationSkill
- accessibility-generatorSkill
- account-deletionSkill
- analytics-setupSkill
- announcement-bannerSkill
- app-clipSkill
- app-extensionsSkill
- app-icon-generatorSkill
- app-store-assetsSkill
- auth-flowSkill
- background-processingSkill
- ci-cd-setupSkill
- cloudkit-syncSkill
- consent-flowSkill
- custom-product-pagesSkill
- data-exportSkill
- debug-menuSkill
- deep-linkingSkill
- error-monitoringSkill
- feature-flagsSkill
- featuring-nominationSkill
- feedback-formSkill
- force-updateSkill
- http-cacheSkill
- image-loadingSkill
- in-app-eventsSkill
- lapsed-userSkill
- live-activity-generatorSkill
- localization-setupSkill
- milestone-celebrationSkill
- networking-layerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this skill when the user:
- Distinctive: line 41
Search for existing logging:
- Distinctive: line 47
If found, ask user:
- Distinctive: line 66
Create logging infrastructure from scratch.
- Distinctive: line 73
Ask user via AskUserQuestion:
- Very specific: line 87
Read template from templates/AppLogger.swift and customize:
- Very specific: line 95
If Sources/ exists → Sources/Logging/AppLogger.swift
- Very specific: line 118
Import in files: import OSLog (not needed if using AppLogger)
- Distinctive: line 120
Add privacy annotations for sensitive data
- Very specific: line 133
Add a test log: AppLogger.general.debug("Test log")
- Distinctive: line 134
Run app, check Xcode console
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
- Categories needed?
- Network, Auth, UI, Data (defaults)
- Custom categories?
- Include migration helpers?
- Extension on String for quick migration
- Temporary print-to-log bridge
Generation Process
Step 1: Create AppLogger.swift
Read template from templates/AppLogger.swift and customize:
- Set subsystem from Bundle.main.bundleIdentifier
- Add user-specified categories
- Include usage examples in comments
Step 2: Determine File Location
Check project structure:
- If
Sources/exists →Sources/Logging/AppLogger.swift - If
App/exists →App/Logging/AppLogger.swift - Otherwise →
Logging/AppLogger.swift
Step 3: Provide Migration Guidance
Show examples of converting common print patterns:
// Before
print("User logged in: \(email)")
// After
AppLogger.auth.info("User logged in: \(email, privacy: .private)")Output Format
After generation, provide:
Files Created
[Path]/Logging/AppLogger.swift
Integration Steps
- Import in files:
import OSLog(not needed if using AppLogger) - Replace print() calls with AppLogger.[category].level
- Add privacy annotations for sensitive data
Privacy Annotations Guide
.public- Safe to log (IDs, counts, non-sensitive).private- Redacted in release (emails, names).sensitive- Always redacted (passwords, tokens)
Console.app Usage
- Open Console.app
- Filter by subsystem:
com.yourapp - Filter by category:
Network,Auth, etc.
Testing Instructions
- Add a test log:
AppLogger.general.debug("Test log") - Run app, check Xcode console
- Open Console.app, filter by your app's subsystem
References
- logger-patterns.md - Best practices and privacy levels
- migration-guide.md - Converting print() to Logger
- templates/AppLogger.swift - Template file
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

