The project consists of two Kotlin Multiplatform (KMP) libraries: Logger and Tracker. The Logger library is designed for logging events with different severity levels. The Tracker library is used for tracking events across different platforms. Both libraries utilize a common codebase with platform-specific implementations to handle device-specific functionalities.
commonMain
: Contains common code shared between platforms.androidMain
: Contains Android-specific implementations.iosMain
: Contains iOS-specific implementations.
- Clone the repository:
git clone https://github.com/cyrillrx/kmp-logger-tracker.git
cd kmp-logger-tracker
- Open the project in Android Studio.
- Sync the project with Gradle files.
- For Android:
./gradlew assembleDebug
- For iOS:
Open the
iosApp
project in Xcode and build.
Logger.addChild(SystemOutLog(Severity.DEBUG))
Logger.addChild(LogCat(Severity.DEBUG, true))
Logger.info("TAG", "Something happened")
Tracker.setupExceptionCatcher { t -> Logger.error("Tracker", "Caught exception", t) }
Tracker.addChild(createTracker())
val event = TrackEvent("Event Name")
Tracker.track(event)
This project is licensed under the MIT License - see the LICENSE file for details.