{"id":17158469,"url":"https://github.com/paulwoitaschek/slimber","last_synced_at":"2025-03-17T11:30:25.822Z","repository":{"id":57730811,"uuid":"52168225","full_name":"PaulWoitaschek/Slimber","owner":"PaulWoitaschek","description":"Built upon Timber. Without performance penality.","archived":false,"fork":false,"pushed_at":"2023-03-04T03:26:10.000Z","size":252,"stargazers_count":124,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T22:45:11.415Z","etag":null,"topics":["android","kotlin","logging","timber"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaulWoitaschek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-20T18:20:59.000Z","updated_at":"2025-01-20T10:40:52.000Z","dependencies_parsed_at":"2024-10-27T12:51:50.845Z","dependency_job_id":"d96940e0-5235-4272-9465-2aa937c1d011","html_url":"https://github.com/PaulWoitaschek/Slimber","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulWoitaschek%2FSlimber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulWoitaschek%2FSlimber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulWoitaschek%2FSlimber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulWoitaschek%2FSlimber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulWoitaschek","download_url":"https://codeload.github.com/PaulWoitaschek/Slimber/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858056,"owners_count":20359271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","kotlin","logging","timber"],"created_at":"2024-10-14T22:11:48.811Z","updated_at":"2025-03-17T11:30:25.214Z","avatar_url":"https://github.com/PaulWoitaschek.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slimber - Zero overhead Logging with Timber\n\nTimber is a great library that makes logging very easy. However traditional logging like\n\n```kotlin\nif (BuildConfig.DEBUG) {\n  Log.d(TAG, expensiveToStringObject.toString())\n}\n```\n\nhas one big advantage: The whole block will only be executed when you are in debug mode. If you pass anything to Timber, the String itself\nand the precalculations will be created. Even if you never planted a tree.\n\nAnd this is where Slimber comes into play: It uses [Kotlin](https://kotlinlang.org/)s `inline`\ncapabilities so we can archieve the **no-cost-effect** because the whole block is executed only when there are trees planted. And remember:\nIn Kotlin you can specify the last function in an arugment of a function outside the parentheses.\n\nSo you can do it like this:\n\n```kotlin\nd { \"onCreate called with $expensiveToStringObject\" }\n```\n\nThere are also functions that take a throwable as the first paramter, so you can use them like\n\n```kotlin\ne(throwable) { \"there was a severe error\" }\n```\n\nBesides from that just use Timber for planting trees like you normally do\n\n```kotlin\nTimber.plant(DebugTree())\n```\n\n# Installation\n\nAdd this to your root `settings.gradle.kts`\n\n```kotlin\ndependencyResolutionManagement {\n  repositories {\n    maven(\"https://jitpack.io\")\n  }\n}\n```\n\nAnd then this dependency to your project:\n\n```kotlin\ndependencies {\n  implementation(\"com.github.PaulWoitaschek:Slimber:x.y.z\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulwoitaschek%2Fslimber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulwoitaschek%2Fslimber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulwoitaschek%2Fslimber/lists"}