{"id":34777628,"url":"https://github.com/simplymika/logbook","last_synced_at":"2026-05-23T08:02:28.808Z","repository":{"id":215006553,"uuid":"737886167","full_name":"SimplyMika/logbook","owner":"SimplyMika","description":"Highly configurable, type-safe logging library for Kotlin/Multiplatform","archived":false,"fork":false,"pushed_at":"2025-02-08T14:27:43.000Z","size":244,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-28T13:26:23.401Z","etag":null,"topics":["kotlin","kotlin-js","kotlin-multiplatform","kotlin-native","logging","logging-library"],"latest_commit_sha":null,"homepage":"https://logbook.micha.moe/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimplyMika.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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,"zenodo":null}},"created_at":"2024-01-01T21:08:40.000Z","updated_at":"2025-02-08T14:27:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea3a3e13-da05-47d3-abe5-baac221070de","html_url":"https://github.com/SimplyMika/logbook","commit_stats":null,"previous_names":["micha-ohne-el/logbook","simplymika/logbook"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/SimplyMika/logbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimplyMika%2Flogbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimplyMika%2Flogbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimplyMika%2Flogbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimplyMika%2Flogbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimplyMika","download_url":"https://codeload.github.com/SimplyMika/logbook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimplyMika%2Flogbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33387656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["kotlin","kotlin-js","kotlin-multiplatform","kotlin-native","logging","logging-library"],"created_at":"2025-12-25T08:37:30.309Z","updated_at":"2026-05-23T08:02:28.792Z","avatar_url":"https://github.com/SimplyMika.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Kotlin 2.1.10](https://img.shields.io/badge/Kotlin%2FMultiplatform-2.1.10-7F52FF.svg?logo=kotlin)](http://kotlinlang.org)\n[![Maven Central](https://img.shields.io/maven-central/v/moe.micha/logbook?label=Latest%20Version)](https://central.sonatype.com/artifact/moe.micha/logbook)\n[![CI status badge](https://img.shields.io/github/actions/workflow/status/Micha-ohne-el/logbook/integration.yaml?label=CI)](https://github.com/Micha-ohne-el/logbook/actions/workflows/integration.yaml)\n[![CD status badge](https://img.shields.io/github/actions/workflow/status/Micha-ohne-el/logbook/deployment.yaml?label=CD)](https://github.com/Micha-ohne-el/logbook/actions/workflows/deployment.yaml)\n[![Documentation available](https://img.shields.io/badge/Documentation-available-blue)](https://logbook.micha.moe)\n[![License – MIT](https://img.shields.io/github/license/Micha-ohne-el/logbook?color=gold\u0026label=License)](https://github.com/Micha-ohne-el/logbook/blob/main/license.md)\n\n# logbook\n\nKotlin/Multiplatform logging library.\n\n## Overview\n\n```kt\n// Logbook.WithDefaults gives us default log levels, formatting, and a console outlet:\nclass ParserLog : Logbook.WithDefaults() {\n    // the logger's name is inferred as \"Parser\" but can be overridden:\n    // override val name = \"Parsing\"\n    \n    // declare a new log level that is lower than debug:\n    val trace by level(placeBefore = debug) {\n        colorInfo = ColorInfo(0x999999) // gray\n    }\n    \n    // set the format of the logger, example output: 2025-02-04T20:46:55Z Parser - warning : something happened!!\n    override fun format(entry: LogEntry) =\n        StartChunks + entry.time.utc.formatAsStandard() + \" \" + entry.logbook + \" - \" + entry.level + \" : \" + data.toString() + EndChunks\n    \n    // set the minimum log level to trace:\n    init {\n        minimumLevel = trace\n    }\n    \n    // add companion object to avoid having to manually construct instance:\n    companion object : ParserLog()\n}\n```\n\n## Installation\n\nSimply add a dependency on logbook to your Gradle project:\n\n```kt\nrepositories {\n    mavenCentral()\n}\n\n// for Kotlin/Multiplatform projects:\nkotlin {\n    sourceSets {\n        commonMain.dependencies {\n            implementation(\"moe.micha:logbook:$version\")\n        }\n    }\n}\n\n// for Kotlin/JVM projects:\nkotlin {\n    dependencies {\n        implementation(\"moe.micha:logbook:$version\")\n    }\n}\n```\n\nReplace `$version` with the version you want, a list of which can be retrieved on\n[Maven Central](https://central.sonatype.com/artifact/moe.micha/logbook/versions).\n\n## Contributing\n\nI would love for people to contribute to logbook!\n\nIf you feel like the library is missing something or you've encountered a bug, please let me know with a\n[GitHub Issue](https://github.com/Micha-ohne-el/logbook/issues)! No need to be shy, there is no format to these Issues,\njust type whatever you want :)\n\nIf you've already got experience with Kotlin, feel free to work on a fix or feature on your own and submitting a\n[Pull Request](https://github.com/Micha-ohne-el/logbook/pulls)! There are no official contribution guidelines, just try your\nbest and I'll see if I can fix some issues if there are any :)\n\n## To Do\n\n* Handle multi-line log messages (such as stack traces).\n* Improve timestamp formatting by using Chunks as well.\n    * Extend Chunks to be able to have a min and max width, padding, alignment, etc.\n    * Also support relative timestamp (relative to the start of the program or to the last log message, etc.)\n* Add some sort of grouping mechanism (such as JavaScript's `console.group`).\n    * Maybe provide two separate functions – `groupImplicitly` and `groupExplicitly`.\n      `groupExplicitly` would take a block in which a sublogger is accessible, which prints to the group.\n      `groupImplicitly` would cause all following calls to the logger to be treated as though they were done on a sublogger.\n      Just some ideas.\n* Add a simple file outlet.\n    * Add option to either append to existing file or clear file on every boot.\n* Add a rotating file outlet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplymika%2Flogbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplymika%2Flogbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplymika%2Flogbook/lists"}