SimpleLoggerUI is a Swift package that provides a complete, ready-to-use SwiftUI interface for inspecting logs collected via the SimpleLogger package.
It includes a full log list screen with filtering, exporting, and platform-appropriate UI behaviour for iOS, macOS, iPadOS, and visionOS—without requiring you to build or manage any custom logging UI.
-
Log list screen
- Displays logs with timestamp, level, subsystem, category, and message
- Visual styling adapts to log severity for improved scan-ability
- Pull-to-refresh support
-
Filtering
- Exclude system logs
- Filter by:
- Specific date
- Date range
- Hour range (within a single day)
- Preset ranges (e.g. recent periods)
- Filter by log level with multi-selection support
-
Exporting
- Export formats:
- Plain log
- JSON
- JSON Lines
- CSV (configurable delimiter)
- Optional gzip compression for file exports
- Export to file system or copy directly to clipboard
- Export formats:
-
Cross-platform
- Adaptive navigation and toolbar behaviour
- Native file exporter integration
- macOS and iOS-appropriate interaction patterns
Add SimpleLoggerUI using Swift Package Manager.
dependencies: [
.package(
url: "https://github.com/markbattistella/SimpleLoggerUI",
from: "1.0.0"
)
]Alternatively, you can add SimpleLoggerUI using Xcode by navigating to File > Add Packages and entering the package repository URL.
LogListScreen is the primary entry point. It manages fetching, filtering, and exporting logs internally using LoggerManager.
![IMPORTANT] You do not need to supply logs manually.
import SwiftUI
import SimpleLoggerUI
struct ContentView: View {
var body: some View {
NavigationStack {
LogListScreen()
}
}
}LogListScreen automatically:
- Fetches logs on appearance
- Supports pull-to-refresh
- Provides toolbar actions for filtering and exporting
- Displays loading and empty states
Tap Filter in the toolbar to open the filter sheet.
Available filter modes:
View logs recorded on a single calendar day.
View logs across multiple days (inclusive).
Select a date and restrict logs to a specific hour window.
Quickly apply commonly used time ranges.
You can also:
- Exclude system logs
- Select which log levels are visible
- Filter changes are applied immediately.
Tap Export in the toolbar to open the export sheet.
- Output formats:
.log.json.jsonl.csv
- CSV delimiter selection
- Optional gzip compression (file exports only)
- Export to file: Saves the export via the system file picker.
- Copy to clipboard: Copies UTF-8 text in the selected format (compression ignored).
Contributions are welcome! Please fork the repository and submit a pull request for any features, fixes, or improvements.
SimpleLoggerUI is available under the MIT license. See the LICENCE file for more information.