{"id":32184839,"url":"https://github.com/b-social/typeset.logback","last_synced_at":"2025-10-21T23:58:14.085Z","repository":{"id":175231492,"uuid":"646841028","full_name":"b-social/typeset.logback","owner":"b-social","description":"Simple JSON layout component for Logback Classic, with Clojure and SLF4J 2+ key value attribute support.","archived":false,"fork":false,"pushed_at":"2024-10-22T10:18:57.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-21T23:58:11.789Z","etag":null,"topics":["clojure","logback","logback-json","logging","slf4j","structured-logging"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/b-social.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-05-29T13:09:58.000Z","updated_at":"2024-10-22T10:16:39.000Z","dependencies_parsed_at":"2023-07-11T07:15:55.734Z","dependency_job_id":"c2d7bc38-9d69-43fb-87fe-c3fd84b0bd1a","html_url":"https://github.com/b-social/typeset.logback","commit_stats":null,"previous_names":["b-social/typeset.logback"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/b-social/typeset.logback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-social%2Ftypeset.logback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-social%2Ftypeset.logback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-social%2Ftypeset.logback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-social%2Ftypeset.logback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b-social","download_url":"https://codeload.github.com/b-social/typeset.logback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-social%2Ftypeset.logback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280354182,"owners_count":26316400,"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-21T02:00:06.614Z","response_time":58,"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":["clojure","logback","logback-json","logging","slf4j","structured-logging"],"created_at":"2025-10-21T23:58:13.071Z","updated_at":"2025-10-21T23:58:14.080Z","avatar_url":"https://github.com/b-social.png","language":"Clojure","readme":"# Typeset.logback\n\nSimple JSON layout component for [Logback][] Classic, with Clojure and [SLF4J][] 2+ key value attribute support.\n\n[Logback]: https://logback.qos.ch/\n[SLF4J]: https://www.slf4j.org/\n\n\n## Installation\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.kroo/typeset.logback.svg)](https://clojars.org/com.kroo/typeset.logback)\n\n```clojure\n;; tools.deps\ncom.kroo/typeset.logback {:mvn/version \"0.7\"}\n\n;; Leiningen\n[com.kroo/typeset.logback \"0.7\"]\n```\n\n\u003e [!NOTE]\n\u003e While this library is designed for and written in Clojure, it still works in\n\u003e other JVM languages.  To use it, add [Clojars](https://clojars.org/) as a Maven repository.\n\n\n## Usage\n\nUse Typeset.logback with the default options:\n\n```xml\n\u003c!-- logback.xml --\u003e\n\u003cconfiguration scan=\"false\" scanPeriod=\"5 seconds\"\u003e\n    \u003cappender name=\"CONSOLE\" class=\"ch.qos.logback.core.ConsoleAppender\"\u003e\n        \u003cencoder class=\"ch.qos.logback.core.encoder.LayoutWrappingEncoder\"\u003e\n            \u003clayout class=\"com.kroo.typeset.logback.JsonLayout\" /\u003e\n        \u003c/encoder\u003e\n    \u003c/appender\u003e\n\n    \u003clogger name=\"TEMP\" level=\"DEBUG\"/\u003e\n\n    \u003croot level=\"INFO\"\u003e\n        \u003cappender-ref ref=\"CONSOLE\" /\u003e\n    \u003c/root\u003e\n\u003c/configuration\u003e\n```\n\nUse Typeset.logback and configure the various options:\n\n```xml\n\u003c!-- logback.xml --\u003e\n\u003cconfiguration scan=\"false\" scanPeriod=\"5 seconds\"\u003e\n    \u003cappender name=\"CONSOLE\" class=\"ch.qos.logback.core.ConsoleAppender\"\u003e\n        \u003cencoder class=\"ch.qos.logback.core.encoder.LayoutWrappingEncoder\"\u003e\n            \u003clayout class=\"com.kroo.typeset.logback.JsonLayout\"\u003e\n                \u003c!-- The following are the default values. --\u003e\n                \u003cprettyPrint\u003efalse\u003c/prettyPrint\u003e\n                \u003cremoveNullKeyValuePairs\u003etrue\u003c/removeNullKeyValuePairs\u003e\n                \u003cremoveEmptyKeyValuePairs\u003efalse\u003c/removeEmptyKeyValuePairs\u003e\n                \u003ctimestampFormat\u003eyyyy-MM-dd'T'HH:mm:ss.SSS'Z'\u003c/timestampFormat\u003e\n                \u003cescapeNonAsciiCharacters\u003efalse\u003c/escapeNonAsciiCharacters\u003e\n                \u003csortKeysLexicographically\u003efalse\u003c/sortKeysLexicographically\u003e\n                \u003cappendLineSeparator\u003etrue\u003c/appendLineSeparator\u003e\n                \u003cincludeLoggerContext\u003efalse\u003c/includeLoggerContext\u003e\n                \u003cincludeLevelValue\u003efalse\u003c/includeLevelValue\u003e\n                \u003cincludeMdc\u003etrue\u003c/includeMdc\u003e\n                \u003cflattenMdc\u003etrue\u003c/flattenMdc\u003e\n                \u003cincludeMarkers\u003etrue\u003c/includeMarkers\u003e\n                \u003cincludeException\u003etrue\u003c/includeException\u003e\n                \u003cincludeExData\u003etrue\u003c/\n                \u003c!-- This is an example of how to add modules to the jackson object mapper --\u003e\n                \u003cjacksonModules\u003e\n                    com.fasterxml.jackson.datatype.joda.JodaModule,\n                    com.fasterxml.jackson.datatype.jsr310.JavaTimeModule\n                \u003c/jacksonModules\u003e\"\n            \u003c/layout\u003e\n        \u003c/encoder\u003e\n    \u003c/appender\u003e\n\n    \u003clogger name=\"TEMP\" level=\"DEBUG\"/\u003e\n\n    \u003croot level=\"INFO\"\u003e\n        \u003cappender-ref ref=\"CONSOLE\" /\u003e\n    \u003c/root\u003e\n\u003c/configuration\u003e\n```\n\nExample log output (with pretty printing enabled):\n\n```jsonc\n{\n  \"timestamp\" : \"2023-06-02T14:43:55.685557Z\",\n  \"level\" : \"WARN\",\n  \"level_value\" : 30000,         // \u003cincludeLevelValue\u003etrue\u003c/includeLevelValue\u003e\n  \"logger.name\" : \"my.logger\",\n  \"logger.context_name\" : \"default\",  // \u003cincludeLoggerContext\u003etrue\u003c/includeLoggerContext\u003e\n  \"logger.thread_name\" : \"my.thread\",\n  \"message\" : \"My formatted message\",\n  \"markers\" : [ \"my-marker\" ],\n  \"mdc\" : {                      // \u003cincludeMdc\u003etrue\u003c/includeMdc\u003e\n    \"some-id\" : \"24676689-cffa-461b-964e-d3fedafe31b5\"\n  },\n  // SLF4J key value pairs.\n  \"things\" : [ 1, {\n    \"hi\" : {\n      \"there\" : 2\n    }\n  }, 3, 4 ],\n  \"@timestamp\" : {               // Duplicate keys get \"@\" prepended to them.\n    \"foo\" : {\n      \"bar\" : 12.4\n    }\n  },\n}\n```\n\nIf you need a structured logging frontend for Clojure, [Epilogue](https://github.com/b-social/epilogue) pairs perfectly with Typeset.logback.\n\n\n## Troubleshooting\n\nIf for some reason you are not getting any logs or are missing some, either your configuration is incorrect or an exception is likely being thrown somewhere.  To get some troubleshooting info, you can edit your `logback.xml` file to include `debug=\"true\"` (or add the `-Dlogback.debug=true` JVM option).\n\n```xml\n\u003c!-- logback.xml --\u003e\n\u003cconfiguration debug=\"true\" ...\u003e\n  ...\n\u003c/configuration\u003e\n```\n\nIf an exception occurs while Typeset.logback is formatting a log event, an \"ERROR\" log will be appended to the Logback appender that contains details of the exception.\n\n\n## Legal\n\nCopyright © 2023 Kroo Bank Ltd.\n\nThis library and source code are available under the terms of the MIT licence. A full copy of the licence file is provided in the `LICENCE` file of the source code.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-social%2Ftypeset.logback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb-social%2Ftypeset.logback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-social%2Ftypeset.logback/lists"}