Skip to content

Toluwanimi9259/timber-track

Repository files navigation

Timber-Track

platform

Timber track is a light-weight, easy-to-use logging library written in kotlin that simplifies logging in apps

Prerequisites

Groovy

Add this in your settings.gradle file :

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
      ...
      maven { url 'https://jitpack.io' }  // Add this Line
    }
}

Kotlin

Add this in your settings.gradle.kts file :

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        ...
        maven(url = "https://jitpack.io")  // Add this line 
    }
}

Dependency

Groovy

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	...
	implementation 'com.github.Toluwanimi9259:timber-track:1.2'
}

Kotlin

Add this to your module's build.gradle.kts file (make sure the version matches the JitPack badge above):

dependencies {
	...
	implementation("com.github.Toluwanimi9259:timber-track:1.2")
}

Usage

It is recommended to check the sample project to get a complete understanding of all the features offered by the library.

Here's an example of a basic log with default message and tag

TimberTrack.log()

Custom message with tag

TimberTrack.log(message = "This is a logging library", tag = "Custom Tag")

Custom message with a toast

val context = LocalContext.current
...
TimberTrack.log(message = "This is a logging library", showToast = true, context = context) // By default the toast is long

Custom message with a short toast

// Toast Length:  Long = 1 , Short = 0 can also use numbers for "toastLength"
TimberTrack.log(message = "This is a logging library", showToast = true, context = context, toastLength = Toast.LENGTH_SHORT)

Contributing

You can contribute using pull requests.

Any contributions, large or small, major features, bug fixes, are welcomed and appreciated.

Contact

About

A Light-Weight logging library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages