{"id":21030906,"url":"https://github.com/chewhx/loglert","last_synced_at":"2026-04-13T21:31:04.403Z","repository":{"id":59350019,"uuid":"536141059","full_name":"chewhx/loglert","owner":"chewhx","description":"Log and print messages with levels and style","archived":false,"fork":false,"pushed_at":"2022-09-13T13:40:16.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T10:16:07.790Z","etag":null,"topics":["cli","command-line","log-level","logger","logging","nodejs","terminal"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chewhx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T13:31:44.000Z","updated_at":"2022-09-13T13:33:21.000Z","dependencies_parsed_at":"2022-09-23T10:05:15.340Z","dependency_job_id":null,"html_url":"https://github.com/chewhx/loglert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chewhx/loglert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewhx%2Floglert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewhx%2Floglert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewhx%2Floglert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewhx%2Floglert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chewhx","download_url":"https://codeload.github.com/chewhx/loglert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewhx%2Floglert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: 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":["cli","command-line","log-level","logger","logging","nodejs","terminal"],"created_at":"2024-11-19T12:22:17.070Z","updated_at":"2026-04-13T21:31:04.378Z","avatar_url":"https://github.com/chewhx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loglert\n\n\u003e Log and print messages with levels and style\n\n- Adapted from [cli-alerts](https://www.npmjs.com/package/cli-alerts) by Ahmad Awais\n- Supports types for your typescript projects\n- Print the styled log message as string to in your own logger - `.print`\n- Convenient methods to log message levels: `.success` , `.info`, `.warning`, `.error`\n- Smaller package size: less than 6kB\n- If you wish to customize further, you will be better off using [chalk](https://www.npmjs.com/package/chalk) and [log-symbols](https://www.npmjs.com/package/log-symbols)\n\n# Install\n\n```bash\nnpm install loglert\n```\n\n# Usage\n\n```javascript\nimport { loglert } from 'loglert';\n\nloglert.success(`Update successful!`);\n```\n\n# API\n\n## loglert(options)\n\n```javascript\nloglert({ msg: 'Updating info', type: 'success', name: 'DONE' });\n```\n\n### options\n\n#### msg\n\nType: `string`\n\nRequired: true\n\n#### type?\n\nType: `'success' | 'error' | 'info' | 'warning'`\n\nDefault: `'info'`\n\n#### showName?\n\nType: `boolean`\n\nDefault: true\n\n#### name?\n\nType: `string`\n\nDefault: 'INFO'\n\n## loglert.success('message', opts)\n\nLogs a success type message.\n\n## loglert.error('message',opts)\n\nLogs an error type message.\n\n## loglert.info('message',opts)\n\nLogs an info type message.\n\n## loglert.warning('message',opts)\n\nLogs a warning type message.\n\n## loglert.print('message',opts)\n\nReturns a string of the type message. You may use this string in your own logger.\n\n### opts\n\n#### showName?\n\nType: `boolean`\n\nDefault: true\n\n#### name?\n\nType: `string`\n\nDefault: 'INFO'\n\n# License\n\nISC ©️ Chew Han Xiang\n\n# Author\n\n**Chew Han Xiang**\n\n- [https://www.chewhx.com/](https://www.chewhx.com/)\n- [https://github.com/chewhx](https://github.com/chewhx)\n- [https://www.linkedin.com/in/chewhx/](https://www.linkedin.com/in/chewhx/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchewhx%2Floglert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchewhx%2Floglert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchewhx%2Floglert/lists"}