{"id":32118799,"url":"https://github.com/legowerewolf/ratlog-deno","last_synced_at":"2026-02-21T10:31:44.032Z","repository":{"id":45688604,"uuid":"300999796","full_name":"legowerewolf/ratlog-deno","owner":"legowerewolf","description":"🐀 Ratlog library for Deno - Application Logging for Rats, Humans, and Machines","archived":false,"fork":false,"pushed_at":"2025-11-21T14:46:19.000Z","size":102,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T16:21:59.077Z","etag":null,"topics":["deno","logging","ratlog","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/legowerewolf.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-03T23:14:17.000Z","updated_at":"2025-11-21T14:46:22.000Z","dependencies_parsed_at":"2023-02-08T08:02:28.373Z","dependency_job_id":"35e9f2dd-99cb-46d5-8888-8f1a92e544b4","html_url":"https://github.com/legowerewolf/ratlog-deno","commit_stats":{"total_commits":103,"total_committers":1,"mean_commits":103.0,"dds":0.0,"last_synced_commit":"c9860a779da4524d573387ed1382e0f570668498"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/legowerewolf/ratlog-deno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legowerewolf%2Fratlog-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legowerewolf%2Fratlog-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legowerewolf%2Fratlog-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legowerewolf%2Fratlog-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/legowerewolf","download_url":"https://codeload.github.com/legowerewolf/ratlog-deno/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legowerewolf%2Fratlog-deno/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["deno","logging","ratlog","typescript"],"created_at":"2025-10-20T17:38:53.764Z","updated_at":"2026-02-21T10:31:44.027Z","avatar_url":"https://github.com/legowerewolf.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐀 Ratlog library for Deno - Application Logging for Rats, Humans, and Machines\n\n[![Github release version (semver)](https://img.shields.io/github/v/release/legowerewolf/ratlog-deno?sort=semver)](https://github.com/legowerewolf/ratlog-deno/releases/latest)\n[![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/legowerewolf/ratlog-deno/latest?sort=semver)](https://github.com/legowerewolf/ratlog-deno/releases/latest)\n[![License](https://img.shields.io/github/license/legowerewolf/ratlog-deno)](https://github.com/legowerewolf/ratlog-deno/blob/main/LICENSE)\n\n[![Deno unit tests](https://img.shields.io/github/actions/workflow/status/legowerewolf/ratlog-deno/tests.yml?label=unit%20tests\u0026logo=deno)](https://github.com/legowerewolf/ratlog-deno/actions?query=workflow%3ADeno)\n[![CodeQL code analysis status](https://img.shields.io/github/actions/workflow/status/legowerewolf/ratlog-deno/codeql-analysis.yml?label=codeql%20analysis)](https://github.com/legowerewolf/ratlog-deno/actions?query=workflow%3ACodeQL)\n\n[![On deno.land/x/ as ratlog](https://img.shields.io/badge/deno%20%2Fx%2F-ratlog-informational)](https://deno.land/x/ratlog)\n\n[Deno](https://deno.land/) implementation of\n[Ratlog log formatter](https://github.com/ratlog/ratlog-spec).\n\n## Getting started\n\nThis package exposes two APIs. The more fully-featured of the two tries to match\nthe [Ratlog.js](https://github.com/ratlog/ratlog.js) API, and is henceforth\ncalled the Classic API.\n\n```ts\n// Import the Classic API from deno.land/x/\nimport ratlog from \"https://deno.land/x/ratlog/classic-api.ts\";\n\n// Set up logging through the console output\nconst log = ratlog(console.log);\n\nlog(\"hello, world\");\n//\u003e hello, world\n\n// Add fields\nlog(\"counting\", { count: 1 });\n//\u003e counting | count: 1\n\n// Add fields and a tag\nlog(\"counting\", { count: -1 }, \"negative\");\n//\u003e [negative] counting | count: -1\n\n// Create another logger bound to a tag\nconst warn = log.tag(\"warning\");\n\nwarn(\"disk space low\");\n//\u003e [warning] disk space low\n\n// Combine and nest tags any way you like\nconst critical = warn.tag(\"critical\");\n\ncritical(\"shutting down all servers\");\n//\u003e [warning|critical] shutting down all servers\n\n// Parse messages\nratlog.parse(\"[negative] counting | count: -1\");\n// returns { message: \"counting\", tags: [\"negative\"], fields: { count: -1 } }\n\nratlog.parse(\"counting | count: 1\");\n// returns { message: \"counting\", fields: { count: 1 } }\n```\n\nThe core of the implementation is exposed in `./ratlog.ts`, and is called the\nCore API. There's less syntactic sugar here.\n\n```ts\n// Import the Core API from deno.land/x/\nimport Ratlog from \"https://deno.land/x/ratlog/ratlog.ts\";\n\nRatlog.log({ message: \"hello, world\" });\n// returns \"hello, world\"\n\nRatlog.log({ message: \"counting\", fields: { count: 1 } });\n// returns \"counting | count: 1\"\n\nRatlog.log({ message: \"counting\", tags: [\"negative\"], fields: { count: -1 } });\n// returns \"[negative] counting | count: -1\"\n\nRatlog.parse(\"[negative] counting | count: -1\");\n// returns { message: \"counting\", tags: [\"negative\"], fields: { count: -1 } }\n\nRatlog.parse(\"counting | count: 1\");\n// returns { message: \"counting\", fields: { count: 1 } }\n\nRatlog.parse(\"hello, world\");\n// returns { message: \"hello, world\" }\n```\n\nAs a function of how the tag generator is implemented, tags can be dynamically\ngenerated.\n\n```ts\nimport Ratlog from \"https://deno.land/x/ratlog/ratlog.ts\";\n\nRatlog.log({\n\tmessage: \"hello, world\",\n\ttags: [{ toString: () =\u003e new Date().toISOString() }],\n});\n// returns `[timestamp] hello world`\n```\n\n## How to help\n\n- Check out\n  [issues requesting commentary](https://github.com/legowerewolf/ratlog-deno/issues?q=is%3Aissue+is%3Aopen+label%3Arequesting_commentary)\n  and share your thoughts.\n\n- Grab an\n  [untouched issue](https://github.com/legowerewolf/ratlog-deno/issues?q=is%3Aissue+is%3Aopen+-linked%3Apr)\n  and start hacking. Start a draft PR and link it to claim the issue.\n\n- Check that dependencies (all found in\n  [deps.ts](https://github.com/legowerewolf/ratlog-deno/blob/main/deps.ts)) are\n  up to date.\n\n- Contribute test cases (input-output pairs) to the\n  [Ratlog spec](https://github.com/ratlog/ratlog-spec) repo (specifically\n  [this file](https://github.com/ratlog/ratlog-spec/blob/master/ratlog.testsuite.json)).\n\n- Contribute test runners (API implementation) to\n  [test.ts](https://github.com/legowerewolf/ratlog-deno/blob/main/test.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegowerewolf%2Fratlog-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegowerewolf%2Fratlog-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegowerewolf%2Fratlog-deno/lists"}