{"id":29829874,"url":"https://github.com/chrynan/logger","last_synced_at":"2025-10-04T11:07:26.706Z","repository":{"id":59188419,"uuid":"147249516","full_name":"chRyNaN/logger","owner":"chRyNaN","description":"A simple Kotlin Multiplatform logging abstraction","archived":false,"fork":false,"pushed_at":"2022-09-12T21:45:39.000Z","size":345,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-10T02:54:00.698Z","etag":null,"topics":["android-log","android-logcat","kotlin","kotlin-library","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-multiplatform-mobile","log","logcat","logger","logging","logging-facade","logging-framework","logging-library","logs"],"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/chRyNaN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-03T20:15:48.000Z","updated_at":"2023-02-19T16:52:58.000Z","dependencies_parsed_at":"2022-09-13T01:51:47.360Z","dependency_job_id":null,"html_url":"https://github.com/chRyNaN/logger","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/chRyNaN/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chRyNaN%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chRyNaN%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chRyNaN%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chRyNaN%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chRyNaN","download_url":"https://codeload.github.com/chRyNaN/logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chRyNaN%2Flogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278302555,"owners_count":25964523,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-log","android-logcat","kotlin","kotlin-library","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-multiplatform-mobile","log","logcat","logger","logging","logging-facade","logging-framework","logging-library","logs"],"created_at":"2025-07-29T09:41:26.866Z","updated_at":"2025-10-04T11:07:26.674Z","avatar_url":"https://github.com/chRyNaN.png","language":"Kotlin","readme":"# logger\n\nA simple Kotlin multi-platform logging abstraction. \u003cbr/\u003e\n\u003cimg alt=\"GitHub tag (latest by date)\" src=\"https://img.shields.io/github/v/tag/chRyNaN/logger\"\u003e\n\nThis library provides simple interfaces to wrap any logging utility and use them in Kotlin Multiplatform code.\n\n```kotlin\nLog.error(\"Error message.\")\n```\n\n## Using the Library\n\n* Assign the `Logger` implementation to the `Log.logger` property (defaults to `DefaultLogger`):\n\n```kotlin\nLog.logger = DefaultLogger()\n```\n\n* Optionally, call the `LogInitializer.init`:\n\n```kotlin\nLog.init()\n```\n\n* Log anything:\n\n```kotlin\nLog.error(message = \"Error Message\", throwable = someException)\n```\n\n### Platform Specific Implementations\n\nThe library provides multiple platform specific `Logger` implementations that could be used or extended. For instance:\n\n#### Common\n\n* `DefaultLogger` - Platform default logging.\n    * **Android:** `LogCatLogger`\n    * **JVM:** `JavaLogger`\n    * **JS:** `ConsoleLogger`\n    * **iOS:** `NSLogger`\n* `DelegatingLogger` - Delegates to one or more `Loggers`.\n* `SimplePrintLineLogger` - Uses the `println()` Kotlin function.\n* `NoActionLogger` - No operation Logger.\n\n#### JavaScript\n\n* `ConsoleLogger` - Uses the browser console.\n\n#### Java\n\n* `JavaLogger` - Uses the JVM Logger class.\n* `JavaAnnotationProcessorMessagerLogger` - Uses the JVM Messager class used in Annotation Processors.\n\n#### Android\n\n* `LogCatLogger` - Uses the Android Log functions.\n\n#### Android Timber\n\n* `TimberLogger` - Uses the Android Timber Library.\n\n#### iOS\n\n* `NSLogger` - Uses `NSLog`.\n\n## Building the library\n\nThe library is provided through [repsy.io](https://repsy.io). Refer to\nthe [releases](https://github.com/chRyNaN/logger/releases) page for the latest version. \u003cbr/\u003e\n\u003cimg alt=\"GitHub tag (latest by date)\" src=\"https://img.shields.io/github/v/tag/chRyNaN/logger\"\u003e\n\n### Repository\n\n```kotlin\nrepositories {\n    maven { url = \"https://repo.repsy.io/mvn/chrynan/public\" }\n}\n```\n\n### Dependencies\n\n**Core Module:**\n\n```kotlin\nimplementation(\"com.chrynan.logger:logger-core:$VERSION\")\n```\n\n**Android Timber Module:**\n\n```kotlin\nimplementation(\"com.chrynan.logger:logger-android-timber:$VERSION-release\")\n```\n\n## Documentation\n\nMore detailed documentation is available in the [docs](docs) folder. The entry point to the documentation can be\nfound [here](docs/index.md).\n\n## License\n\n```\nCopyright 2021 chRyNaN\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrynan%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrynan%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrynan%2Flogger/lists"}