{"id":16113154,"url":"https://github.com/cuppachino/logger","last_synced_at":"2026-02-04T11:04:22.593Z","repository":{"id":64825240,"uuid":"573680228","full_name":"cuppachino/logger","owner":"cuppachino","description":"Tiny logging utility for tiny projects. Enjoy colored console output without overthinking it.","archived":false,"fork":false,"pushed_at":"2023-12-15T02:41:34.000Z","size":136,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-23T20:21:09.898Z","etag":null,"topics":["color","logger","logging","tagging","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cuppachino/logger","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuppachino.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}},"created_at":"2022-12-03T04:34:47.000Z","updated_at":"2023-08-02T14:24:08.000Z","dependencies_parsed_at":"2024-10-09T20:10:29.335Z","dependency_job_id":"8724642c-8e4c-4d1e-8139-56bbf1defcda","html_url":"https://github.com/cuppachino/logger","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"24a4e38cee9a46eb64f0f1df8d66df4055037a77"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuppachino","download_url":"https://codeload.github.com/cuppachino/logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911237,"owners_count":20367649,"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":["color","logger","logging","tagging","typescript"],"created_at":"2024-10-09T20:10:26.048Z","updated_at":"2026-02-04T11:04:22.542Z","avatar_url":"https://github.com/cuppachino.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @cuppachino/logger\n\nTiny logging utility for tiny projects. Enjoy colored console output without\noverthinking it.\n\n## 📦 Installation\n\n[@cuppachino/logger](https://www.npmjs.com/package/@cuppachino/logger)\n\n```ps\npnpm add @cuppachino/logger\npnpm add -D chalk\n```\n\nor\n\n```ps\nnpm install @cuppachino/logger\nnpm install --save-dev chalk\n```\n\n## 🔍 Example Usage\n\n```ts\nimport { createLogger } from '@cuppachino/logger'\n\nconst logger = createLogger('main' /* Options */)\n\nlogger.tag('example', 'blue', 'bold', 'italic').log('hello world')\nlogger.log('foo').untag()\nlogger.log('bar')\n```\n\n\u003cimg src=\"./example-log.png\" alt=\"Example log output\" title=\"Example Output\"\u003e\n\n## 🛠️ Configuration\n\n- `colors`: an array of colors/modifiers from `chalk` applied to the logger's\n  prefix (default: `'gray'`).\n- `tagWrapColors`: an array of colors/modifiers applied to the characters that\n  wrap each tag (default: `'dim'`).\n- `tagWrapStyle`: the characters used to wrap each tag (default: `'square'`).\n\n```ts\ntype LoggerOptions = {\n\tcolors: Color[]\n\ttagWrapColors: Color[]\n\ttagWrapStyle: WrapStyle\n\t// \"angled\" | \"square\" | \"curly\" | \"parens\"\n}\n```\n\n## 💪 Methods\n\n- `tag`: pushes a tag to the stack\n- `untag`: removes the previous tag from the stack.\n- `log`: writes a message to the console, prepended by the logger prefix and any\n  tags.\n- `error`: throws an error\n\n---\n\n## ✏️ Todo\n\n```ts\n/*\n- transports\n- levels-like filtering with tags (ideally avoid upfront logger config)\n- maybe more... \n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppachino%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuppachino%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppachino%2Flogger/lists"}