Menu

AppLoggerKit: privacy-first logging for Swift apps (OSLog, JSON Lines, redaction, export)
📰

AppLoggerKit: privacy-first logging for Swift apps (OSLog, JSON Lines, redaction, export)

DEV Community: swift·Dheerendra Chaturvedi·2 days ago
#Wr5Hil11
#devtoswift#devto#dev#expect#logger
Reading 0:00
15s threshold

Logs are one of the most common places sensitive data leaks from an iOS app. They end up in sysdiagnoses, support emails, crash tickets and bug trackers, and a single print("\(user)") or "token=\(token)" can put an email address or a bearer token in all of them.

I wanted Apple's unified logging, optional log files users can send to support, and real privacy guarantees, without pulling in a third-party SDK. So I built AppLoggerKit : a free, MIT-licensed logging and local diagnostics package for Swift, SwiftUI and UIKit with no third-party dependencies .

What's inside

Module What it gives you

AppLoggerCore AppLogger with seven levels, lazy messages, categories and scoped loggers; structured LogRecord with a versioned JSON schema; public / private / sensitive metadata; a Redactor ; LogContext for correlation IDs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.