{"id":13455350,"url":"https://github.com/sidhantpanda/logt","last_synced_at":"2025-09-06T04:32:39.749Z","repository":{"id":35130698,"uuid":"210418705","full_name":"sidhantpanda/logt","owner":"sidhantpanda","description":"🖥️ A colourful logger for the browser","archived":false,"fork":false,"pushed_at":"2023-12-15T02:42:53.000Z","size":2726,"stargazers_count":193,"open_issues_count":15,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T09:59:21.474Z","etag":null,"topics":["color","console","frontend","frontend-app","javascript","log","logger","loglevel","typescript"],"latest_commit_sha":null,"homepage":"https://sidhantpanda.github.io/logt/dist/","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/sidhantpanda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-23T17:56:02.000Z","updated_at":"2025-07-24T06:58:57.000Z","dependencies_parsed_at":"2023-12-15T03:39:03.365Z","dependency_job_id":"d526cf58-77dd-427c-99f6-3facf0e5c05d","html_url":"https://github.com/sidhantpanda/logt","commit_stats":{"total_commits":182,"total_committers":2,"mean_commits":91.0,"dds":0.02197802197802201,"last_synced_commit":"53ab51262fa42d21cd10150f342254d75ec8ba1a"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/sidhantpanda/logt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidhantpanda%2Flogt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidhantpanda%2Flogt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidhantpanda%2Flogt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidhantpanda%2Flogt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidhantpanda","download_url":"https://codeload.github.com/sidhantpanda/logt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidhantpanda%2Flogt/sbom","scorecard":{"id":822529,"data":{"date":"2025-08-11","repo":{"name":"github.com/sidhantpanda/logt","commit":"82a310c6af2640de4275e212092647a68501bb51"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/22 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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/static.yml:14","Info: no jobLevel write permissions found"],"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/sidhantpanda/logt/static.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/sidhantpanda/logt/static.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/sidhantpanda/logt/static.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/sidhantpanda/logt/static.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 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"}},{"name":"Vulnerabilities","score":0,"reason":"28 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T15:56:18.969Z","repository_id":35130698,"created_at":"2025-08-23T15:56:18.969Z","updated_at":"2025-08-23T15:56:18.969Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273858655,"owners_count":25180765,"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-06T02:00:13.247Z","response_time":2576,"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":["color","console","frontend","frontend-app","javascript","log","logger","loglevel","typescript"],"created_at":"2024-07-31T08:01:04.238Z","updated_at":"2025-09-06T04:32:39.714Z","avatar_url":"https://github.com/sidhantpanda.png","language":"TypeScript","readme":"\u003ca href=\"https://www.npmjs.com/package/logt\"\u003e\n  \u003cimg src=\"https://badge.fury.io/js/logt.svg\" alt=\"npm version\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://david-dm.org/sidhantpanda/logt\"\u003e\n  \u003cimg src=\"https://david-dm.org/sidhantpanda/logt.svg\" alt=\"Dependency Status\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://david-dm.org/sidhantpanda/logt#info=devDependencies\"\u003e\n  \u003cimg src=\"https://david-dm.org/sidhantpanda/logt/dev-status.svg\" alt=\"devDependency Status\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/sidhantpanda/logt\"\u003e\n  \u003cimg src=\"https://codecov.io/gh/sidhantpanda/logt/branch/master/graph/badge.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://snyk.io//test/github/sidhantpanda/logt?targetFile=package.json\"\u003e\n  \u003cimg src=\"https://snyk.io//test/github/sidhantpanda/logt/badge.svg?targetFile=package.json\" alt=\"Known Vulnerabilities\" data-canonical-src=\"https://snyk.io//test/github/sidhantpanda/logt?targetFile=package.json\" style=\"max-width:100%;\"\u003e\n\u003c/a\u003e\n\n# LogT\n\n🖥️ A colorful logger for the browser\n\n![LogT Screenshot](assets/screenshot.png?raw=true 'LogT Screenshot')\n\n## See it in action\n\nDemo - \u003ca href=\"https://sidhantpanda.github.io/logt/dist/\"\u003e\nhttps://sidhantpanda.github.io/logt/dist/\n\u003c/a\u003e\n\n## Features\n\n-   **Small library size** - Only ~1.45KB gzipped!\n-   **Colorful labels** to help distinguish logs by importance.\n-   **[Override default console methods](#readconsole)** to use custom logger instead, anywhere on the web page\n-   **[Log levels](#logger-initialization)** to hide less important log messages.\n-   **[Show hidden messages programmatically](#showhiddenloglevel--1--0--1--2--3--4--5--none--error--warn--info--verbose--debug--silly)** to print logs hidden due log level.\n-   **Built with TypeScript** for detailed type info and that sweet sweet autocomplete.\n    \u003cp align=\"center\"\u003e\n      \u003cimg src=\"https://media.giphy.com/media/ckNv6K3sRo8dWOUtH7/giphy.gif\" /\u003e\n    \u003c/p\u003e\n\n## Installation\n\n```\n$ npm i logt -S\n```\n\n## Usage\n\nYou can use this logger for your frontend projects. You can choose as an ES6 module or directly include the script in HTML.\n\n#### As an ES6 module\n\nCreate a file in your project called `logger.js` or `logger.ts`\n\n```typescript\nimport LogT from 'logt';\n\nconst LOG_TAG = 'sample tag';\nlet logger;\nif (process.env.NODE_ENV === 'production') {\n    logger = new LogT('error'); // or logger = new LogT(\"none\");\n} else {\n    logger = new LogT('silly');\n}\n\n// See documentation for `readConsole()` for usage\n// uncomment following line if you want to override default console methods\n// logger.readConsole();\n\nlogger.error(LOG_TAG, new Error('example error'));\n\nexport default logger;\n```\n\n#### Include in HTML\n\n```javascript\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/sidhantpanda/logt/dist/logt.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var LOG_TAG = 'sample tag';\n  var logger = createLogger('error');\n\n  // See documentation for `readConsole()` for usage\n  // uncomment following line if you want to override default console methods\n  // logger.readConsole();\n\n  logger.error(LOG_TAG, new Error('example error'));\n\u003c/script\u003e\n```\n\n## Documentation\n\n#### Logger initialization\n\n```typescript\nimport LogT from 'logt';\n\nlet logger;\n// Available log levels -  -1 | 0 | 1 | 2 | 3 | 4 | 5 | 'none' | 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly';\n\n// noneLogger will print nothing\nnoneLogger = new LogT(-1); // or\nnoneLogger = new LogT('none');\n// if included via HTML script\nnoneLogger = createLogger(-1); // or\nnoneLogger = createLogger('none');\n\n// errorLogger will only error messages\nerrorLogger = new LogT(0); // or\nerrorLogger = new LogT('error');\n// if included via HTML script\nerrorLogger = createLogger(0); // or\nerrorLogger = createLogger('error');\n\n// sillyLogger will print all messages\nsillyLogger = new LogT(5); // or\nsillyLogger = new LogT('silly');\n// if included via HTML script\nsillyLogger = createLogger(5); // or\nsillyLogger = createLogger('silly');\n```\n\nIf any other value is supplied to the constructor, a default value of `none` is used.\n\n### APIs\n\n#### `error(logTag: string, message: any, ...rest: any[])`\n\n##### Parameters\n\n-   `logTag` - A log tag to identify the message and point to source of the message.\n-   `message` - The error log message\n-   `...rest` - Any additional arguments to be passed onto `console.error`\n\n#### `warn(logTag: string, message: any, ...rest: any[])`\n\n##### Parameters\n\n-   `logTag` - A log tag to identify the message and point to source of the message.\n-   `message` - The warning log message\n-   `...rest` - Any additional arguments to be passed onto `console.warn`\n\n#### `info(logTag: string, message: any, ...rest: any[])`\n\n##### Parameters\n\n-   `logTag` - A log tag to identify the message and point to source of the message.\n-   `message` - The info log message\n-   `...rest` - Any additional arguments to be passed onto `console.info`\n\n#### `verbose(logTag: string, message: any, ...rest: any[])`\n\n##### Parameters\n\n-   `logTag` - A log tag to identify the message and point to source of the message.\n-   `message` - The verbose log message\n-   `...rest` - Any additional arguments to be passed onto `console.log`\n\n#### `debug(logTag: string, message: any, ...rest: any[])`\n\n##### Parameters\n\n-   `logTag` - A log tag to identify the message and point to source of the message.\n-   `message` - The debug log message\n-   `...rest` - Any additional arguments to be passed onto `console.log`\n\n#### `silly(logTag: string, message: any, ...rest: any[])`\n\n##### Parameters\n\n-   `logTag` - A log tag to identify the message and point to source of the message.\n-   `message` - The silly log message\n-   `...rest` - Any additional arguments to be passed onto `console.log`\n\n#### `getLogLevel(): number`\n\nReturns the logger instance's log level in numeric form;\n\n#### `setLogLevel(logLevel: string | number)`\n\nUpdate a logger instance's logLevel dynamically later.\n\n##### Parameters\n\n-   `logLevel` - New logLevel for the instance. Values: -1 | 0 | 1 | 2 | 3 | 4 | 5 | 'none' | 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly'\n\n#### `showHidden(logLevel: -1 | 0 | 1 | 2 | 3 | 4 | 5 | 'none' | 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly')`\n\nShow log messages hidden by the logger. Only logs equal or above `logLevel` will be shown.\n\n##### Parameters\n\n-   `logLevel` - Log level for which logs are to be shown\n\n##### Example\n\n```typescript\nconst logger = new LogT(0);\nlogger.warn('TAG', 'warning message'); // Will not print anything to console\nlogger.info('TAG', 'info message'); // Will not print anything to console\nlogger.debug('TAG', 'debug message'); // Will not print anything to console\nlogger.silly('TAG', 'silly message'); // Will not print anything to console\n\nlogger.showHidden(1); // Will print the warning message\nlogger.showHidden(2); // Will print the info message\nlogger.showHidden(5); // Will print the debug as well as silly message\n```\n\n#### `readConsole()`\n\nReplace default `console.error`, `console.warn`, `console.info`, `console.log` implementation with `logt` logger.\n\n##### Example\n\n```typescript\nconst logger = new LogT(0);\nlogger.readConsole();\n\nconsole.error(new Error('test error')); // will be same as logger.error('console', new Error('test error'));\nconsole.warn('warn message'); // will be same as logger.warn('console', 'warn message');\nconsole.log('info message'); // will be same as logger.info('console', 'info message');\nconsole.log('log message'); // will be same as logger.debug('console', 'log message');\n```\n\n## Changelog\n\n### v1.5.0\n\n-   Deprecate `image()` method. Will be removed in next major release. Logging images is no longer supported by Chromme.\n\n### v1.4.0\n\n-   Added `image()` method\n\n### v1.2.0\n\n-   [Added `readConsole()` method](#readconsole)\n\n## Roadmap\n\nCheckout the [project page](https://github.com/sidhantpanda/logt/projects/1) for details about future development.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidhantpanda%2Flogt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidhantpanda%2Flogt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidhantpanda%2Flogt/lists"}