{"id":20767807,"url":"https://github.com/decaded/nyalog","last_synced_at":"2026-02-19T12:01:54.525Z","repository":{"id":257790391,"uuid":"861177569","full_name":"Decaded/NyaLog","owner":"Decaded","description":"A simple and customizable logging package for console output, supporting multiple timestamp formats.","archived":false,"fork":false,"pushed_at":"2024-11-26T22:52:27.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-16T05:34:54.034Z","etag":null,"topics":["console","javascript","logger","logging","timestamp"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@decaded/nyalog","language":"JavaScript","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/Decaded.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"Decaded","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-09-22T07:56:30.000Z","updated_at":"2024-11-26T22:52:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"100ef359-7dc5-47a5-a5e3-bfc4b8310e39","html_url":"https://github.com/Decaded/NyaLog","commit_stats":null,"previous_names":["decaded/nyalog"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Decaded/NyaLog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decaded%2FNyaLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decaded%2FNyaLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decaded%2FNyaLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decaded%2FNyaLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Decaded","download_url":"https://codeload.github.com/Decaded/NyaLog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decaded%2FNyaLog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29612509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"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","javascript","logger","logging","timestamp"],"created_at":"2024-11-17T11:33:29.242Z","updated_at":"2026-02-19T12:01:54.503Z","avatar_url":"https://github.com/Decaded.png","language":"JavaScript","funding_links":["https://ko-fi.com/Decaded","https://ko-fi.com/L3L02XV6J"],"categories":[],"sub_categories":[],"readme":"# NyaLog\r\n\r\nA lightweight, customizable logging package for console output with multiple timestamp formats and color-coded log levels.\r\n\r\n[![npm (scoped)](https://img.shields.io/npm/v/@decaded/nyalog)](https://www.npmjs.com/package/@decaded/nyalog)\r\n[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@decaded/nyalog)](https://bundlephobia.com/result?p=@decaded/nyalog)\r\n[![npm](https://img.shields.io/npm/dt/@decaded/nyalog)](https://www.npmjs.com/package/@decaded/nyalog)\r\n[![GitHub](https://img.shields.io/github/license/Decaded/nyalog)](https://github.com/Decaded/nyalog/blob/master/LICENSE.md)\r\n![GitHub Actions](https://github.com/Decaded/NyaLog/actions/workflows/node.js.yml/badge.svg)\r\n\r\n---\r\n\r\n## Installation\r\n\r\nYou can install NyaLog via npm:\r\n\r\n```bash\r\nnpm install @decaded/nyalog\r\n```\r\n\r\n## Usage\r\n\r\nFirst, require the package in your application:\r\n\r\n```javascript\r\nconst Logger = require('nyalog');\r\n```\r\n\r\nThen, initialize it in one of two ways:\r\n\r\nStandard:\r\n\r\n```javascript\r\nconst logger = new Logger();\r\n```\r\n\r\nWith a timestamp format:\r\n\r\n```javascript\r\nconst logger = new Logger({ timestampFormat: 'ISO' });\r\n```\r\n\r\nFor supported [timestamp formats](#supported-timestamp-formats), refer to the table below.\r\n\r\n### Logging Messages\r\n\r\nYou can log messages of different types:\r\n\r\n| Log Type | Usage Example                                                                           | Color        |\r\n| -------- | --------------------------------------------------------------------------------------- | ------------ |\r\n| `info`   | `logger.consoleLog('info', 'This is an informational message.');`                       | Cyan         |\r\n| `warn`   | `logger.consoleLog('warn', 'This is a warning message.');`                              | Yellow       |\r\n| `error`  | `logger.consoleLog('error', 'This is an error message.', 'Additional error details.');` | Red          |\r\n| `ok`     | `logger.consoleLog('ok', 'Operation completed successfully!');`                         | Green        |\r\n| `debug`  | `logger.consoleLog('debug', 'Debugging information here...');`                          | Bold Magenta |\r\n| `stop`   | `logger.consoleLog('stop', 'This is a stop message.');`                                 | Bold Red     |\r\n| `start`  | `logger.consoleLog('start', 'This is a start message.');`                               | Bold Green   |\r\n\r\nIn case of a spelling error in `log type`, detailed path to the problem will be provided:\r\n\r\n```javascript\r\nlogger.consoleLog('eror', 'This is wrongly typed value.');\r\n\r\n// 09-22-2024 08:10:18 || [ UNDEFINED LOG TYPE ] \"eror\"\r\n//                         Location: at function \u003canonymous\u003e (/home/decaded/Projects/NyaLog/example/index.js:17:8);\r\n```\r\n\r\n⚠ **`NOTE`**: NyaLog automatically provides detailed error paths for undefined log types.\r\n\r\n### `consoleLog` Parameters\r\n\r\n- **`logType`** (string): Specifies the type of log (e.g., `'info'`, `'error'`, etc.).\r\n- **`message`** (string): The primary message to be logged.\r\n- **`extraDetails`** (string): An optional secondary argument specifically for the `'error'` log type.\r\n\r\n### Supported Timestamp Formats\r\n\r\n| Name     | Format                |\r\n| -------- | --------------------- |\r\n| European | `DD-MM-YYYY HH:mm:ss` |\r\n| American | `MM-DD-YYYY HH:mm:ss` |\r\n| ISO      | `YYYY-MM-DD HH:mm:ss` |\r\n\r\nYou can specify the desired format during initialization:\r\n\r\n```javascript\r\nconst logger = new Logger({ timestampFormat: 'ISO' });\r\n```\r\n\r\n⚠ **`NOTE`**: This is case insensitive. `European` is used by default when no value is provided.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please open an [issue](https://github.com/Decaded/NyaLog/issues) or submit a [pull request](https://github.com/Decaded/NyaLog/pulls) on the\r\n[GitHub repository](https://github.com/Decaded/nyalog).\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n## Like what I do?\r\n\r\nIf you find this project helpful or fun to use, consider supporting me on Ko-fi! Your support helps me keep creating and improving.\r\n\r\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/L3L02XV6J)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecaded%2Fnyalog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecaded%2Fnyalog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecaded%2Fnyalog/lists"}