{"id":3567,"url":"https://github.com/JakeWharton/timber","last_synced_at":"2025-08-03T20:32:42.048Z","repository":{"id":9580142,"uuid":"11495787","full_name":"JakeWharton/timber","owner":"JakeWharton","description":"A logger with a small, extensible API which provides utility on top of Android's normal Log class.","archived":false,"fork":false,"pushed_at":"2024-08-07T18:27:28.000Z","size":1458,"stargazers_count":10453,"open_issues_count":59,"forks_count":961,"subscribers_count":250,"default_branch":"trunk","last_synced_at":"2024-10-29T16:19:19.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jakewharton.github.io/timber/docs/5.x/","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/JakeWharton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2013-07-18T06:23:33.000Z","updated_at":"2024-10-29T09:10:06.000Z","dependencies_parsed_at":"2024-09-17T00:26:37.748Z","dependency_job_id":"4a741f74-a258-4e94-92ad-c97c3d8df8d5","html_url":"https://github.com/JakeWharton/timber","commit_stats":{"total_commits":327,"total_committers":59,"mean_commits":"5.5423728813559325","dds":0.5688073394495412,"last_synced_commit":"beb8051248164a74b264d30427f633aaf4bda841"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Ftimber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Ftimber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Ftimber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Ftimber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeWharton","download_url":"https://codeload.github.com/JakeWharton/timber/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228567009,"owners_count":17937983,"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":[],"created_at":"2024-01-05T20:16:45.156Z","updated_at":"2024-12-07T05:30:39.820Z","avatar_url":"https://github.com/JakeWharton.png","language":"Kotlin","funding_links":[],"categories":["Logger","Technologies used:","Android ##","Libraries","Kotlin","Java","Uncategorized","Android Kotlin Project Showcase","Libs","日志库","必备开发库"],"sub_categories":["Logger","Uncategorized","\u003cA NAME=\"Utility\"\u003e\u003c/A\u003eUtility","Android 常用库"],"readme":"![Timber](logo.png)\n\nThis is a logger with a small, extensible API which provides utility on top of Android's normal\n`Log` class.\n\nI copy this class into all the little apps I make. I'm tired of doing it. Now it's a library.\n\nBehavior is added through `Tree` instances. You can install an instance by calling `Timber.plant`.\nInstallation of `Tree`s should be done as early as possible. The `onCreate` of your application is\nthe most logical choice.\n\nThe `DebugTree` implementation will automatically figure out from which class it's being called and\nuse that class name as its tag. Since the tags vary, it works really well when coupled with a log\nreader like [Pidcat][1].\n\nThere are no `Tree` implementations installed by default because every time you log in production, a\npuppy dies.\n\n\nUsage\n-----\n\nTwo easy steps:\n\n 1. Install any `Tree` instances you want in the `onCreate` of your application class.\n 2. Call `Timber`'s static methods everywhere throughout your app.\n\nCheck out the sample app in `timber-sample/` to see it in action.\n\n\nLint\n----\n\nTimber ships with embedded lint rules to detect problems in your app.\n\n *  **TimberArgCount** (Error) - Detects an incorrect number of arguments passed to a `Timber` call for\n    the specified format string.\n\n        Example.java:35: Error: Wrong argument count, format string Hello %s %s! requires 2 but format call supplies 1 [TimberArgCount]\n            Timber.d(\"Hello %s %s!\", firstName);\n            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n *  **TimberArgTypes** (Error) - Detects arguments which are of the wrong type for the specified format string.\n\n        Example.java:35: Error: Wrong argument type for formatting argument '#0' in success = %b: conversion is 'b', received String (argument #2 in method call) [TimberArgTypes]\n            Timber.d(\"success = %b\", taskName);\n                                     ~~~~~~~~\n *  **TimberTagLength** (Error) - Detects the use of tags which are longer than Android's maximum length of 23.\n\n        Example.java:35: Error: The logging tag can be at most 23 characters, was 35 (TagNameThatIsReallyReallyReallyLong) [TimberTagLength]\n            Timber.tag(\"TagNameThatIsReallyReallyReallyLong\").d(\"Hello %s %s!\", firstName, lastName);\n            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n *  **LogNotTimber** (Warning) - Detects usages of Android's `Log` that should be using `Timber`.\n\n        Example.java:35: Warning: Using 'Log' instead of 'Timber' [LogNotTimber]\n            Log.d(\"Greeting\", \"Hello \" + firstName + \" \" + lastName + \"!\");\n                ~\n\n *  **StringFormatInTimber** (Warning) - Detects `String.format` used inside of a `Timber` call. Timber\n    handles string formatting automatically.\n\n        Example.java:35: Warning: Using 'String#format' inside of 'Timber' [StringFormatInTimber]\n            Timber.d(String.format(\"Hello, %s %s\", firstName, lastName));\n                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n *  **BinaryOperationInTimber** (Warning) - Detects string concatenation inside of a `Timber` call. Timber\n    handles string formatting automatically and should be preferred over manual concatenation.\n\n        Example.java:35: Warning: Replace String concatenation with Timber's string formatting [BinaryOperationInTimber]\n            Timber.d(\"Hello \" + firstName + \" \" + lastName + \"!\");\n                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n *  **TimberExceptionLogging** (Warning) - Detects the use of null or empty messages, or using the exception message\n    when logging an exception.\n\n        Example.java:35: Warning: Explicitly logging exception message is redundant [TimberExceptionLogging]\n             Timber.d(e, e.getMessage());\n                         ~~~~~~~~~~~~~~\n\n\nDownload\n--------\n\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n  implementation 'com.jakewharton.timber:timber:5.0.1'\n}\n```\n\nDocumentation is available at [jakewharton.github.io/timber/docs/5.x/](https://jakewharton.github.io/timber/docs/5.x/).\n\n\u003cdetails\u003e\n\u003csummary\u003eSnapshots of the development version are available in Sonatype's snapshots repository.\u003c/summary\u003e\n\u003cp\u003e\n\n```groovy\nrepositories {\n  mavenCentral()\n  maven {\n    url 'https://oss.sonatype.org/content/repositories/snapshots/'\n  }\n}\n\ndependencies {\n  implementation 'com.jakewharton.timber:timber:5.1.0-SNAPSHOT'\n}\n```\n\nSnapshot documentation is available at [jakewharton.github.io/timber/docs/latest/](https://jakewharton.github.io/timber/docs/latest/).\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\nLicense\n-------\n\n    Copyright 2013 Jake Wharton\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n [1]: http://github.com/JakeWharton/pidcat/\n [snap]: https://oss.sonatype.org/content/repositories/snapshots/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJakeWharton%2Ftimber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJakeWharton%2Ftimber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJakeWharton%2Ftimber/lists"}