{"id":23349979,"url":"https://github.com/anthgrim/nodejs-api-logger","last_synced_at":"2026-04-11T02:02:24.122Z","repository":{"id":65491463,"uuid":"592956142","full_name":"anthgrim/nodejs-api-logger","owner":"anthgrim","description":"NodeJS API Logger","archived":false,"fork":false,"pushed_at":"2023-01-26T20:26:20.000Z","size":212,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T02:49:33.437Z","etag":null,"topics":["api","javascript","logger","nodejs","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nodejs-server-log","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/anthgrim.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":"2023-01-24T22:19:20.000Z","updated_at":"2023-03-25T00:57:12.000Z","dependencies_parsed_at":"2023-02-14T23:31:34.465Z","dependency_job_id":null,"html_url":"https://github.com/anthgrim/nodejs-api-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2Fnodejs-api-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2Fnodejs-api-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2Fnodejs-api-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2Fnodejs-api-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthgrim","download_url":"https://codeload.github.com/anthgrim/nodejs-api-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704575,"owners_count":20982298,"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","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":["api","javascript","logger","nodejs","npm-package","typescript"],"created_at":"2024-12-21T08:14:28.905Z","updated_at":"2026-04-11T02:02:24.045Z","avatar_url":"https://github.com/anthgrim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJs-server-log\n\n## [nodejs-server-log](https://www.npmjs.com/package/nodejs-server-log)\n\n## Description\n\nThis is a small package for logging purposes. It logs to the console and writes a file of the specific log in a ./logs directory in the root folder.\n\n### Disclaimer\n\nAs of now, the levels of log are the following: info, database,\nerror, fatal, debug, and access. We will be working on make it more customizable in future releases\n\n## Installation\n\nFollow the commands bellow\n\n```\ncd \u003cYourProjectName\u003e\nnpm i nodejs-server-log\n```\n\n## How to use?\n\n```JavaScript\nimport { log } from \"nodejs-server-log\";\n```\n\n## log\n\nlog will allow you to log to the console, and write a file with the specific message\n\n```JavaScript\nlog({ levelName: 'debug', message: 'Debugging log' })\nlog({ levelName: 'access', message: 'Access log' })\nlog({ levelName: 'database', message: 'Database log' })\nlog({ levelName: 'info', message: 'Info log' })\nlog({ levelName: 'error', message: '', error: new Error('General error') })\nlog({ levelName: 'fatal', message: '', error: new Error('Fatal error') })\n```\n\nOutput:\n![logs](./public/logs.png)\n\n### readLog\n\nreadLogs return a formatted table of the specified logs\n\n```JavaScript\nimport { readLog } from 'nodejs-server-log'\n\nreadLog('error')\n```\n\nOutput:\n![readLog](./public/readlog.png)\n\n## How to contribute\n\n- Fork this repository\n- Follow the git commands in your favorite terminal\n  ```bash\n  git clone git@github.com:\u003cgithubUsername\u003e/nodejs-api-logger.git\n  cd nodejs-api-logger\n  git checkout -b \u003cNameYourNewBranch\u003e\n  ```\n- After adding your changes please commit the new branch and open a PR\n  ```bash\n  git add \u003cYourChanges\u003e\n  git commit -m \u003cYour changes comments\u003e\n  git push origin \u003cYour branch name\u003e\n  ```\n- Pull Request in GitHub [Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthgrim%2Fnodejs-api-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthgrim%2Fnodejs-api-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthgrim%2Fnodejs-api-logger/lists"}