oslog-logger-defaults
Installation
SKILL.md
OSLog / os.Logger Defaults
When to invoke
- Starting a new Apple-platform project and picking a logging library.
- Writing the first
Loggerdeclaration. - Deciding the default for privacy interpolation.
- User asks "OSLog vs SwiftLog vs CocoaLumberjack", "
.privatevs.publichow to pick".
Default decisions
- Use Apple's built-in
os.Logger(import os); do not pull in any third-party logging library. - Naming conventions:
subsystem= bundle ID (e.g.com.example.myapp)category= module name (aligned with the SwiftPM target name)
- Privacy interpolation is type-dependent, not "all private": dynamic strings and complex objects default to
.private; integer, floating-point, and Boolean values default to.public. Any identifying numeric value (player ID, user ID, serial number) must be marked.privateexplicitly.
import os