{"id":43155930,"url":"https://github.com/jotavejv/stylish-log","last_synced_at":"2026-02-01T00:37:47.361Z","repository":{"id":57182548,"uuid":"90911625","full_name":"jotavejv/stylish-log","owner":"jotavejv","description":"🎉  Stylish-log \"A beautiful way to see your web console logs\"","archived":false,"fork":false,"pushed_at":"2017-05-29T18:21:10.000Z","size":311,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T14:22:34.028Z","etag":null,"topics":["console","css-styles","debugger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jotavejv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-10T21:54:29.000Z","updated_at":"2020-11-25T06:01:20.000Z","dependencies_parsed_at":"2022-09-11T22:40:13.336Z","dependency_job_id":null,"html_url":"https://github.com/jotavejv/stylish-log","commit_stats":null,"previous_names":["jotavejv/app-debugger"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jotavejv/stylish-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavejv%2Fstylish-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavejv%2Fstylish-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavejv%2Fstylish-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavejv%2Fstylish-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jotavejv","download_url":"https://codeload.github.com/jotavejv/stylish-log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavejv%2Fstylish-log/sbom","scorecard":{"id":534832,"data":{"date":"2025-08-11","repo":{"name":"github.com/jotavejv/stylish-log","commit":"4d57de83363e464598f5579684678a43f0f3a88f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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"}}]},"last_synced_at":"2025-08-20T06:40:20.025Z","repository_id":57182548,"created_at":"2025-08-20T06:40:20.025Z","updated_at":"2025-08-20T06:40:20.025Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28962316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T23:03:11.038Z","status":"ssl_error","status_checked_at":"2026-01-31T22:56:44.691Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["console","css-styles","debugger"],"created_at":"2026-02-01T00:37:45.102Z","updated_at":"2026-02-01T00:37:47.356Z","avatar_url":"https://github.com/jotavejv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stylish-log\n### A *stylish* `console.log`\n\nTransform your `console.log` into a customized logs.\nThis does not override the default `console.log`, it just add a new way to debug with **CSS styles**.\n\n## How to install\n\n```js\nnpm install stylish-log\n```\n\nThen you call it with `import` or `require`:\n```js\nimport log from 'stylish-log'\n\n//OR\n\nconst log = require('stylish-log');\n```\n\n## How to use\n\nThere are **4 stylish-log methods** that you can use:\n\n- log.show\n- log.info\n- log.warn\n- log.danger\n\n\nThe default styles for these methods are:\n```js\nconst styles = {\n  default: 'color: gray; font-weight: bold;',\n  info: 'color: blue; font-weight: bold;',\n  warn: 'color: #ffc107;',\n  danger: 'color: lightcoral; font-weight: bold;'\n}\n```\n\n## Basic examples\n\nSee how this example are shown in console\n```js\nlog.show('default')();\nlog.info('info')();\nlog.warn('warn')();\nlog.danger('danger')();\n```\n\n![demo1](demos/demo1.png \"Basic example, single messages\")\n\nYou can pass how many values you want to **stylish-log methods**, if you have more than just one, the first *string* message becomes a *\"label message\"* for your log. Take a look:\n\n\n```js\nconst arrObj = [\n  {\n    \"obj1\": \"lorem value\",\n    \"obj2\": \"lorem value\"\n  },\n  {\n    \"obj1_2\": \"lorem value\",\n    \"obj2_2\": \"lorem value\"\n  }\n]\nconst arr = ['arr', 'arr2', 'arr3'];\n\nconst fn = function(){\n  console.log('A function');\n}\n\n//call stylish-log for each value passing a custom message label\n\nlog.show('label message:', arrObj)();\nlog.info('label message:', arr)();\nlog.warn('label message:', arr, arrObj)();\nlog.danger('label message:', fn)();\n```\n\nSee how this example are shown in console\n\n![demo2](demos/demo2.png \"label message\")\n\n### How to change the default style\n\nYou have total freedom to override the default styles for each method\n\n```js\nlog.styles.default = 'font-size: 14px; color: #795548; text-transform: uppercase;';\nlog.styles.info = 'font-size: 14px; background: #4fc3f7; color: white;';\nlog.styles.warn = 'font-size: 14px; color: black; background: linear-gradient(to right, #ffa726, #ffe0b2)';\nlog.styles.danger = 'font-size: 14px; color: white; text-shadow: 0 1px 0 black, 0 0 8px red;';\n```\n\n![demo3](demos/demo3.png \"user styles\")\n\nAs you can see even gradients are supported.\n\nAnother example with **images**:\n\n```js\nlog.styles.default = 'background: url(https://i.imgflip.com/1plo8j.jpg) left bottom no-repeat; background-size: contain; display: block; padding: 150px 80px';\n\nlog.show('')();\n```\nAssuming that the `padding` is respectively `height` and `width` you can set an image to console.\nIn this case the **default style** was overrided and then `log.show('')()` was called, passing an **empty string** to initiate the *image* log.\n\n![demo4](demos/demo4.png \"bg image\");\n\nWhat about **emojis**? Yes you can!\n\n```js\nlog.styles.default = 'font-size: 50px;';\n\nlog.show('🐴', 'go horse')();\n```\n![demo5](demos/demo5.png \"emoji\")\n\n## Important\nYou should have noticed about the **double ()()** call from the methods in the examples. There was an initial version (*not published*) that you could just call the methods with **single ()**, the reason of the double **()()** are the *stack trace* in the console. \nYou can see the difference between below:\n\n```js\nlog.show('testing single () call');\n```\n\u003c!-- ![stack1](demos/stack1.png \"stack1\") --\u003e\n![stack2](demos/stack1-2.png \"stack1-2\")\n\n```js\nlog.show('testing double ()() call')();\n```\n\u003c!-- ![stack3](demos/stack2-2.png \"stack2\") --\u003e\n![stack4](demos/stack2.png \"stack2-2\")\n\n\n## Why?\n\nIn fact, this module is just a stylish `console.log` which provides a simple way to customize your logs with CSS styles.\nYou can take the same effect using the example `console.log(%c My log message, 'color: gray; font-weight: bold;')` this will generate the same result as `log.show('My log message')()`.\n\nIf you prefer an elegant and useful way to style your console, feel free to use and enjoy it.\n\n### TODO\n\n- Custom methods\n- Preview improvements\n- Icons\n\n---\n\n###### A special thanks to [@UltCombo](https://github.com/UltCombo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotavejv%2Fstylish-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjotavejv%2Fstylish-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotavejv%2Fstylish-log/lists"}