{"id":22261416,"url":"https://github.com/mhio/node-logger","last_synced_at":"2025-06-23T16:08:44.301Z","repository":{"id":42899690,"uuid":"252614403","full_name":"mhio/node-logger","owner":"mhio","description":"Node logging with pino+debug","archived":false,"fork":false,"pushed_at":"2023-01-05T18:21:26.000Z","size":390,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T12:33:48.168Z","etag":null,"topics":["debug","logging","pino"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mhio.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":"2020-04-03T02:31:35.000Z","updated_at":"2021-05-05T02:37:12.000Z","dependencies_parsed_at":"2023-02-04T10:02:00.638Z","dependency_job_id":null,"html_url":"https://github.com/mhio/node-logger","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mhio/node-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fnode-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fnode-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fnode-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fnode-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhio","download_url":"https://codeload.github.com/mhio/node-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fnode-logger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261509917,"owners_count":23169682,"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":["debug","logging","pino"],"created_at":"2024-12-03T09:12:43.876Z","updated_at":"2025-06-23T16:08:44.232Z","avatar_url":"https://github.com/mhio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"@mhio/node-logger\n-----------\n\nNode logging with [`pino`](https://github.com/pinojs/pino) and [`debug`](https://github.com/visionmedia/debug).\n\n```\nyarn add @mhio/node-logger\n```\n\nSetup a base logger in `./logger.js`\n```\nimport { MhioLogger } from '@mhio/node-logger'\nexport const Logger = new MhioLogger('your:log:prefix')\nexport default Logger\n// or\nconst { MhioLogger } = require('@mhio/node-logger')\nconst Logger = new MhioLogger('your:log:prefix')\nmodule.exports = Logger\n```\n\nThen in each module\n```\nimport Logger from './logger'\nconst Logger = require('./logger')\n\nconst { logger, debug } = Logger.ns('myModule')\n\n// Pino\nlogger.info({ msg: 'test', data: {} })\n\n// DEBUG=\"your:prefix\" node app.js\ndebug('test', { ok: true })\n```\n\n## Changelog\n\n0.3.0 Upgrade to pino 6, remove debug as it's a runtime injection\n\n0.2.0 Remove `{namespace}` duplication from loggers metadata\n\n## Related\n\n[`@mhio/node-logger-http`](https://github.com/mhio/node-logger-http)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhio%2Fnode-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhio%2Fnode-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhio%2Fnode-logger/lists"}