{"id":28205796,"url":"https://github.com/coast-framework/logger","last_synced_at":"2025-06-11T11:31:37.310Z","repository":{"id":62435321,"uuid":"199377922","full_name":"coast-framework/logger","owner":"coast-framework","description":"12 factor ring logging middleware","archived":false,"fork":false,"pushed_at":"2019-08-18T01:48:26.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-17T10:08:32.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/coast-framework.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":"2019-07-29T04:25:41.000Z","updated_at":"2019-08-18T01:48:28.000Z","dependencies_parsed_at":"2022-11-01T21:02:44.543Z","dependency_job_id":null,"html_url":"https://github.com/coast-framework/logger","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/coast-framework%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coast-framework","download_url":"https://codeload.github.com/coast-framework/logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Flogger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259255503,"owners_count":22829484,"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":"2025-05-17T10:08:33.545Z","updated_at":"2025-06-11T11:31:37.286Z","avatar_url":"https://github.com/coast-framework.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logger\n12 factor ring logging middleware\n\n## Installation\n\nMake your [deps.edn](https://clojure.org/guides/deps_and_cli) look like this:\n\n```clojure\ncoast-framework/logger {:mvn/version \"1.0.0\"}\n```\n\n## Usage\n\nRequire it like this\n\n```clojure\n(ns your-project\n  (:require [logger.core :as logger]))\n```\n\nLog stuff like this, returns a string\n\n```clojure\n(logger/line \"Request started\" {\"request-method\" \"GET\" \"uri\" \"/\"})\n; =\u003e \"[timestamp] Request started request-method=GET\" uri=/\n\n(logger/line \"Request finished\" {\"status\" 200 \"content-type\" \"text/plain\"})\n; =\u003e \"[timestamp] Request finished status=200 content-type=text/plain\"\n```\n\nUse the middleware like this\n\n```clojure\n(def app (-\u003e (your-ring-app)\n             (logger/logger)))\n```\n\nThis calls `println` twice and logs *two* ring request/response lines that look like this:\n\n```\n[timestamp] Request started request-method=GET route=home/index uri=/\n[timestamp] Request finished status=200 duration=10ms content-type=text/html\n```\n\n*Note* route is only logged if there is a `:route` keyword in the request map\n\n## Testing\n\n```sh\ncd logger \u0026\u0026 make test\n```\n\n## License\n\nMIT\n\n## Contribution\n\nCreate an issue, star it or make a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoast-framework%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoast-framework%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoast-framework%2Flogger/lists"}