Repository navigation
SwiftMoLogger 3.0.0
SwiftMoLogger 3.0.0 — complete rewrite around structured LogEntry, Swift Concurrency, and a multi-product architecture.
Re-issued from a fresh
3.0.0commit onmainthat bundles the v3.0.0 feature set with a few library fixes surfaced while wiring the end-to-end example app.
✨ Highlights
- Structured
LogEntryeverywhere — level, tag, metadata, source location, timestamp. - Multi-engine fan-out: Memory + System + File + Remote + custom.
SamplingLogEngine+RateLimitingLogEnginedecorators for field-device sanity.RedactingLogEngine— regex PII scrubber on emails, tokens, card numbers.ErrorGroupingEngine— identical-shape errors collapse into a fingerprinted group.- Sentry-compatible breadcrumbs ring buffer.
LogSignpost.measurespans +#log/#measure/@AutoLogmacros viaSwiftMoLoggerSugar.- W3C distributed tracing —
TraceContext+traceparentinjection throughSwiftMoLoggerNetwork. DiagnosticsHubView— live SwiftUI hub: timeline, network waterfall, signpost flame graph, vitals charts, breadcrumbs.FlightRecorder— rolling 2-minute black box for post-crash forensics.AppVitalsMonitor— periodic memory / CPU / FPS / thermal / battery.BugReporter— one-call bundle of logs + breadcrumbs + vitals + device info, ready forShareLink.LiveSink+swiftmologger-inspectorCLI — Bonjour log tail for DEBUG builds.MetricKitCrashReporter— mirror MetricKit crash + hang payloads into the pipeline.- Remote shippers: Sentry envelopes, Datadog logs API, Grafana Loki push.
- Testing helpers:
XCTAssertLogged+RecordingLogEngine. - Ships
PrivacyInfo.xcprivacy.
🔧 Library fixes folded into this 3.0.0 cut
FlightRecorder.defaultFileURLis nowpublic(was internal but referenced as a public default arg — caused a compile error on adopters).FlightRecorder.start()always registers its own memory engine instead of silently skipping when anyMemoryLogEnginewas already in the registry.MetricKitCrashReporterupdated for iOS 17+ SDK whereMXHangDiagnostic.hangDurationis now aMeasurement<UnitDuration>.LogConsoleViewModel.entriesrelaxed tointernal(set)so@testableconsumers can seed entries.FlightRecorderTestsreset global state insetUp.Package.swiftplatforms now declare iOS 16 / macOS 13 / tvOS 16 / watchOS 9 (the UI module already used iOS-16-only APIs unguarded).
📦 Products
SwiftMoLogger— core API + enginesSwiftMoLoggerUI— Console + Diagnostics HubSwiftMoLoggerNetwork— auto URLSession captureSwiftMoLoggerDiagnostics— vitals, bug report, LiveSink, WebSocket tailSwiftMoLoggerSugar—#log/#measure/@AutoLogmacrosSwiftMoLoggerRemote— Sentry / Datadog / Loki shippersSwiftMoLoggerTesting— XCTest helpersswiftmologger-inspector— macOS CLI Bonjour log tail
📱 End-to-end showcase
ExampleApp/SwiftMoLoggerExample now exercises every product in 6 tabs (Demo / Console / Hub / Network / Diagnostics / About). Open the project, ⌘R, and you'll see the entire v3 surface in motion.
📥 Install
.package(url: "https://github.com/MoElnaggar14/SwiftMoLogger.git", from: "3.0.0")
⚠️ Note for adopters who already pinned3.0.0: the tag was rewritten to point at this fresh commit. Runswift package resolve(or File → Packages → Reset Package Caches in Xcode) to pick up the new hash.