{"id":15698271,"url":"https://github.com/vedang/clj-logging","last_synced_at":"2025-05-09T01:13:06.856Z","repository":{"id":66954603,"uuid":"437983292","full_name":"vedang/clj-logging","owner":"vedang","description":"This is a template Clojure project showcasing how to configure Log4J2 as the logging backend properly, across all transitive dependencies of the project.","archived":false,"fork":false,"pushed_at":"2025-04-27T17:43:12.000Z","size":49,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-09T01:13:01.060Z","etag":null,"topics":["clojure","logging"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vedang.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":"2021-12-13T18:32:55.000Z","updated_at":"2025-04-27T17:43:19.000Z","dependencies_parsed_at":"2024-10-24T03:51:17.253Z","dependency_job_id":"e79eb16e-156a-4d71-8895-63123f1f9552","html_url":"https://github.com/vedang/clj-logging","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedang%2Fclj-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedang%2Fclj-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedang%2Fclj-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedang%2Fclj-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vedang","download_url":"https://codeload.github.com/vedang/clj-logging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171272,"owners_count":21865297,"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":["clojure","logging"],"created_at":"2024-10-03T19:24:47.697Z","updated_at":"2025-05-09T01:13:06.836Z","avatar_url":"https://github.com/vedang.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# me.vedang/logger : Emitting Structured Logs from your Clojure code\n\nThis is a `deps-new` template which creates a logger component that I use in my code. I reproduce this same logging code in every new project using this template\n\n## Usage\n\nTo install this code, run the following command inside your project\n\n```bash\nclojure -Sdeps '{:deps {io.github.vedang/clj-logging {:git/sha \"318419e65228a0700476a5e954cc1116045999ed\"}}}' -Tnew create :template me.vedang/logger :name your.group.artifact/logger\n```\n\nNote: The command above assumes you have installed `deps-new` as your `new` \"tool\" via:\n\n```bash\nclojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new\n```\n\nThis is create a folder called `logger`. To use this folder, you can add an alias as follows to your main `deps.edn` file:\n\n```clojure\n:logs-dev\n {:extra-deps {me.vedang/logger {:local/root \"logger\"}}\n  :jvm-opts\n   [\"-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory\"\n    \"-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog\"\n    \"-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector\"\n    \"-Dlog4j2.configurationFile=logger/log4j2-dev.xml\"\n    ;; Change logging.level to one of TRACE, DEBUG, INFO, WARN, ERROR\n    ;; depending on requirement during development\n    \"-Dlogging.level=INFO\"]}\n```\n\nNow, you can `require` the `namespace` `your.group.artifact.logger.interface` everywhere in your project, and use the macros defined in it. This namespace is a thin wrapper on top of the `pedestal.log` logging library to ensure structured logging (JSON) output.\n\nNote that this code is Babashka compliant, meaning it will work in your BB projects as well.\n\n## Developing the template\n\nRun this template project's tests (by default, this just validates your template's `template.edn`\nfile -- that it is valid EDN and it satisfies the `deps-new` Spec for template files):\n\n    $ clojure -T:build test\n\n## License\n\nCopyright © 2024 Vedang Manerikar\n\nDistributed under the Eclipse Public License version 1.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedang%2Fclj-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvedang%2Fclj-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedang%2Fclj-logging/lists"}