{"id":30694785,"url":"https://github.com/ratismal/cat-loggr","last_synced_at":"2025-09-02T06:44:52.633Z","repository":{"id":49711605,"uuid":"138894304","full_name":"Ratismal/cat-loggr","owner":"Ratismal","description":"A simple, lightweight utility for making beautiful logs.","archived":false,"fork":false,"pushed_at":"2023-07-12T02:41:09.000Z","size":45,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-02T06:44:46.347Z","etag":null,"topics":["logging","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Ratismal.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2018-06-27T14:39:32.000Z","updated_at":"2025-08-31T00:25:38.000Z","dependencies_parsed_at":"2024-06-19T06:10:50.656Z","dependency_job_id":"ffd7f779-6c4f-45ed-b1c6-208c866551fc","html_url":"https://github.com/Ratismal/cat-loggr","commit_stats":{"total_commits":49,"total_committers":4,"mean_commits":12.25,"dds":"0.36734693877551017","last_synced_commit":"af99dd1fe28def2141e8ec753a6eeeff26a6c21b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ratismal/cat-loggr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fcat-loggr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fcat-loggr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fcat-loggr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fcat-loggr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ratismal","download_url":"https://codeload.github.com/Ratismal/cat-loggr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fcat-loggr/sbom","scorecard":{"id":118218,"data":{"date":"2025-08-11","repo":{"name":"github.com/Ratismal/cat-loggr","commit":"af99dd1fe28def2141e8ec753a6eeeff26a6c21b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license.md:0","Info: FSF or OSI recognized license: MIT License: license.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T01:55:04.596Z","repository_id":49711605,"created_at":"2025-08-16T01:55:04.596Z","updated_at":"2025-08-16T01:55:04.596Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273244301,"owners_count":25070959,"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-09-02T02:00:09.530Z","response_time":77,"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":["logging","nodejs"],"created_at":"2025-09-02T06:44:51.642Z","updated_at":"2025-09-02T06:44:52.568Z","avatar_url":"https://github.com/Ratismal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cat Loggr\n\n[![npm](https://img.shields.io/npm/v/cat-loggr.svg)](https://www.npmjs.com/package/cat-loggr)\n\nA simple, lightweight utility for making beautiful logs.\n\n## Goals\n\n1. Be lightweight\n2. Be a drop-in replacement for `console.log`\n3. Generate pretty, colourful logs\n4. Support sharded projects (via a shard ID)\n5. Support parsing of multiple arguments, including the inspecting of objects\n6. Support defining display options at execution\n\n## Screenshots\n\n![blargbot logs](https://cat.needs-to-s.top/87a975.png)\n\n## Installation\n\n```\nnpm i --save cat-loggr\n```\n\n## Basic Usage\n\n```js\n// JavaScript:\nconst CatLoggr = require('cat-loggr');\n// TypeScript:\nimport CatLoggr from 'cat-loggr/ts';\n\nconst loggr = new CatLoggr();\n\nloggr.log('Hello, world!');\n```\n\nThat's it!\n\n## Default Log Levels\n- fatal\n- error\n- warn\n- trace\n- init\n- info\n- verbose\n- debug (aliases: log, dir)\n\nIf defined, the `info` level is default. If not, the lowest priority level is default.\n\n## More Advanced Usage\n\n### Custom levels\n\n```js\nconst loggr = new CatLoggr({\n    levels: [\n        { name: 'catnip', color: CatLoggr._chalk.red.bgBlack },\n        { name: 'fish', color: CatLoggr._chalk.black.bgRed }\n    ]\n});\n// OR\nconst loggr = new CatLoggr()\n    .setLevels([\n        { name: 'catnip', color: CatLoggr._chalk.red.bgBlack },\n        { name: 'fish', color: CatLoggr._chalk.black.bgRed }\n    ]);\n\nloggr.fish('Delicious!');\n```\n\n### Level threshold\n\n```js\nconst loggr = new CatLoggr({\n    level: 'warn'\n});\n// OR\nconst loggr = new CatLoggr()\n    .setLevel('warn');\n\nloggr.info('This will not display,');\nloggr.warn('but this will!');\n```\n\n### Meta\n\n- depth - how far into an object to inspect\n- color - whether to render colors\n- trace - whether to generate a stacktrace\n\n```js\nconst loggr = new CatLoggr();\n\nlet obj = {\n    with: {\n        depth: {\n            fun: '!'\n        }\n    }\n};\n\nloggr.log(obj);\n// { with: { depth: [Object] } }\nloggr.meta({depth: 2}).log(obj);\n// { with: { depth: { fun: '!' } } }\n```\n\n### Hooks\n\nYou can define hook for extra argument processing.\n\nIf the hook callback returns `null` or `undefined`, the processing for that argument will continue. Otherwise, it will cease if an actual value is returned.\n\nReturned values will be added to the log's output. If an array is returned, each element of the array will be added individually.  \n\n```js\nclass Cat {}\nconst cat = new Cat();\n\nconst loggr = new CatLoggr()\n    .addArgHook(function({ arg, date }) {\n        if (arg instanceof Cat)\n            return 'kitty!';\n    });\n\nloggr.log(cat);\n// kitty!\n```\n\nYou can also define hooks for post processing.\n```js\nconst loggr = new CatLoggr()\n    .addPostHook(function({ text }) {\n        return 'Hello, ' + text; \n    });\n\nloggr.log('world!');\n// Hello, world!\n```\n\n### Global\n\nIf you want to go full meme, you can make CatLoggr overwrite the global `console` object! Use responsibly.\n\n```js\nconst loggr = new CatLoggr()\n    .setGlobal();\n\nconsole.log('Hello, world!');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratismal%2Fcat-loggr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratismal%2Fcat-loggr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratismal%2Fcat-loggr/lists"}