Skip to content

cyrillrx/kmp-logger-tracker

Repository files navigation

Logger and Tracker project

Overview

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.

Project Structure

  • commonMain: Contains common code shared between platforms.
  • androidMain: Contains Android-specific implementations.
  • iosMain: Contains iOS-specific implementations.

Getting Started

Installation

  1. Clone the repository:
git clone https://github.com/cyrillrx/kmp-logger-tracker.git
cd kmp-logger-tracker
  1. Open the project in Android Studio.
  2. Sync the project with Gradle files.

Building the Project

  • For Android:
./gradlew assembleDebug
  • For iOS: Open the iosApp project in Xcode and build.

Usage

Logger

Logger.addChild(SystemOutLog(Severity.DEBUG))
Logger.addChild(LogCat(Severity.DEBUG, true))

Logger.info("TAG", "Something happened")

Tracker

Tracker.setupExceptionCatcher { t -> Logger.error("Tracker", "Caught exception", t) }
Tracker.addChild(createTracker())

val event = TrackEvent("Event Name")
Tracker.track(event)

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published