Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markbattistella/simpleloggerui
SimpleLoggerUI is a Swift package that provides a set of convenient SwiftUI views to easily integrate logging functionalities into your iOS or macOS applications. This package allows developers to display, filter, and export log entries without the need to build custom interfaces from scratch.
https://github.com/markbattistella/simpleloggerui
hacktoberfest ios ipados logger macos oslog swift swiftui visionos
Last synced: about 1 month ago
JSON representation
SimpleLoggerUI is a Swift package that provides a set of convenient SwiftUI views to easily integrate logging functionalities into your iOS or macOS applications. This package allows developers to display, filter, and export log entries without the need to build custom interfaces from scratch.
- Host: GitHub
- URL: https://github.com/markbattistella/simpleloggerui
- Owner: markbattistella
- License: mit
- Created: 2024-09-11T05:14:12.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T23:18:13.000Z (about 1 month ago)
- Last Synced: 2024-11-16T00:19:30.536Z (about 1 month ago)
- Topics: hacktoberfest, ios, ipados, logger, macos, oslog, swift, swiftui, visionos
- Language: Swift
- Homepage:
- Size: 17.7 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleLoggerUI
![Swift Versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmarkbattistella%2FSimpleLoggerUI%2Fbadge%3Ftype%3Dswift-versions)
![Platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmarkbattistella%2FSimpleLoggerUI%2Fbadge%3Ftype%3Dplatforms)
![Licence](https://img.shields.io/badge/Licence-MIT-white?labelColor=blue&style=flat)
`SimpleLoggerUI` is a Swift package that provides a set of convenient SwiftUI views to easily integrate logging functionalities into your iOS or macOS applications. This package allows developers to display, filter, and export log entries without the need to build custom interfaces from scratch.
Features
- **Filtering:** Easily filter logs by categories, levels, and search text.
- **Exporting:** Export logs in multiple formats, including `.log`, `.json`, `.md`, `.txt`, and `.csv`.
- **User Friendly:** Intuitive and accessible UI components for seamless integration into your application.## Installation
Add `SimpleLoggerUI` to your Swift project using Swift Package Manager.
```swift
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.
## Usage
### LogExportScreen
`LogExportScreen` provides a user interface for exporting log entries with various filtering options, making it easy to select specific logs and export them in the desired format.
> [!Important]
> `SimpleLoggerUI` requires the `SimpleLogger` package, which is added by default. `SimpleLogger` provides all the OS logging logic.```swift
import SwiftUI
import SimpleLogger
import SimpleLoggerUIstruct ContentView: View {
@StateObject private var loggerManager = LoggerManager()var body: some View {
NavigationView {
LogExportScreen(vm: loggerManager)
}
}
}
```### LogListScreen
`LogListScreen` displays log entries in a searchable list format, allowing users to browse, search, and filter logs by categories and levels.
> [!Note]
> `LogListScreen` is already included in `LogExportScreen`. Use the list screen if you want to use it standalone without the export view.```swift
import SwiftUI
import SimpleLoggerUIstruct ContentView: View {
@State private var logs: [OSLogEntryLog] = []var body: some View {
NavigationView {
LogListScreen(logs: logs)
}
}
}
```## Examples
### Video - iOS
[LogExportScreen demo video](https://github.com/user-attachments/assets/9aea2fb6-a471-400a-ba47-85b1f9e90884)
### Images
|||
|-|-|
| ![iOS](.github/data/ios.png) | ![iPadOS](.github/data/ipados.png) |
| ![macOS](.github/data/macos.png) | ![visionOS](.github/data/visionos.png) |## Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any features, fixes, or improvements.
## License
`SimpleLoggerUI` is available under the MIT license. See the LICENSE file for more information.