Timber track is a light-weight, easy-to-use logging library written in kotlin that simplifies logging in apps
Add this in your settings.gradle
file :
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven { url 'https://jitpack.io' } // Add this Line
}
}
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
}
}
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'
}
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")
}
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)
You can contribute using pull requests.
Any contributions, large or small, major features, bug fixes, are welcomed and appreciated.