{"id":19720753,"url":"https://github.com/ngthucdotcom/use-logger","last_synced_at":"2026-06-12T00:31:40.219Z","repository":{"id":57397792,"uuid":"405142406","full_name":"ngthucdotcom/use-logger","owner":"ngthucdotcom","description":"Basic Logger for JS","archived":false,"fork":false,"pushed_at":"2022-02-22T09:06:15.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T06:58:59.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/use-logger","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/ngthucdotcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-10T16:19:23.000Z","updated_at":"2021-10-13T11:16:39.000Z","dependencies_parsed_at":"2022-09-04T01:50:39.866Z","dependency_job_id":null,"html_url":"https://github.com/ngthucdotcom/use-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ngthucdotcom/use-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fuse-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fuse-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fuse-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fuse-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngthucdotcom","download_url":"https://codeload.github.com/ngthucdotcom/use-logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fuse-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34224103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":[],"created_at":"2024-11-11T23:12:23.857Z","updated_at":"2026-06-12T00:31:40.153Z","avatar_url":"https://github.com/ngthucdotcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-logger\r\nuseLogger hook for React.js\r\n\r\n## Usage\r\n\r\n### Install package\r\n```\r\n npm i --save-dev use-logger\r\n```\r\n\r\n### Use package\r\n* Import to component\r\n```\r\n import {useLogger} from \"use-logger\";\r\n```\r\n\r\n* Init class/function/component name for every component\r\n```\r\n const logger = useLogger(\u003capp-name\u003e);\r\n```\r\n\r\n* Write log with type info | warning | error\r\n```\r\n logger.log_info(data, options);\r\n```\r\n```\r\n logger.log_warn(data, options);\r\n```\r\n```\r\n logger.log_error(data, options);\r\n```\r\n\r\n## Development commands\r\n\r\n```\r\n // watch\r\n yarn start\r\n\r\n // or\r\n npm run start\r\n```\r\n\r\n```\r\n // builds the dist folder\r\n yarn build\r\n\r\n // or\r\n npm run build\r\n```\r\n\r\n## Deployment to NPM\r\n\r\n### Login to correct NPM account\r\n\r\n```\r\nnpm login\r\n```\r\n\r\n### Versioning\r\n\r\nIncrease the version number as per NPM guides [https://docs.npmjs.com/about-semantic-versioning].\r\n\r\n```\r\n// increases the first digit i.e. from 0.5.4 to 1.0.0\r\nnpm version major\r\n\r\n// increases the second digit i.e. from 0.0.3 to 0.1.0\r\nnpm version minor\r\n\r\n// increases the third digit i.e. from 0.0.1 to 0.0.2\r\nnpm version patch\r\n```\r\n\r\n### Deployment\r\n\r\nRun the command and the package should be up.\r\n\r\n```\r\nnpm publish --access public\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngthucdotcom%2Fuse-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngthucdotcom%2Fuse-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngthucdotcom%2Fuse-logger/lists"}