{"id":20495303,"url":"https://github.com/vexell/nodejs-lsd-logger","last_synced_at":"2026-01-27T02:08:22.716Z","repository":{"id":65826217,"uuid":"600567464","full_name":"VeXell/nodejs-lsd-logger","owner":"VeXell","description":"Node.js logger for LSD streaming deamon","archived":false,"fork":false,"pushed_at":"2024-11-14T11:51:45.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T08:45:11.115Z","etag":null,"topics":["log","logger","logging","logging-library","logs","lsd"],"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/VeXell.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-11T22:11:18.000Z","updated_at":"2024-11-14T11:51:49.000Z","dependencies_parsed_at":"2023-02-27T00:00:44.385Z","dependency_job_id":null,"html_url":"https://github.com/VeXell/nodejs-lsd-logger","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"ab6b12bd15a8856d1db831b90549ceedb228c33d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeXell%2Fnodejs-lsd-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeXell%2Fnodejs-lsd-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeXell%2Fnodejs-lsd-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeXell%2Fnodejs-lsd-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VeXell","download_url":"https://codeload.github.com/VeXell/nodejs-lsd-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248756489,"owners_count":21156779,"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":["log","logger","logging","logging-library","logs","lsd"],"created_at":"2024-11-15T17:45:22.279Z","updated_at":"2026-01-27T02:08:22.679Z","avatar_url":"https://github.com/VeXell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js logger for LSD Server [![npm version](https://badge.fury.io/js/nodejs-lsd-logger.svg)](https://www.npmjs.com/package/nodejs-lsd-logger)\n\nNode.js logger for [LSD streaming deamon](https://github.com/badoo/lsd)\n\nLogger writes to small files, depending on current time.\n\n```\nlsd_dir/category_name/year|month|day|hour|minute.log\n// for example\nlsd_dir/category_name/202302121626.log\n```\n\nAll messages written to these files less than PIPE_BUF (4k in Linux by default).\n\nIf you write lines larger than PIPE_BUF, logger creates another file with postfix `_big` (for example `lsd_dir/category_name/202302121626_big.log`) and flock(LOCK_EX) for writing.\n\n## Install\n\n```bash\nnpm install nodejs-lsd-logger\n```\n\n## Usage\n\nImport `writeLog` or `writeJson` function from the library and use it to write data.\nBoth functions return Promise and you can catch logging errors.\n\n```javascript\n// import { writeLog } from 'nodejs-lsd-logger';\nimport { writeJson } from 'nodejs-lsd-logger';\n\nwriteJson('path/to/lsd_dir', {\n    string: 'string',\n    number: 123,\n}).catch((error) =\u003e {\n    console.error(error);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexell%2Fnodejs-lsd-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvexell%2Fnodejs-lsd-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexell%2Fnodejs-lsd-logger/lists"}