{"id":23591116,"url":"https://github.com/uphold/debino","last_synced_at":"2026-02-17T02:08:29.123Z","repository":{"id":269278192,"uuid":"906294224","full_name":"uphold/debino","owner":"uphold","description":"A logging library that combines the simplicity and convenience of debug with the power of pino.","archived":false,"fork":false,"pushed_at":"2025-01-22T05:09:22.000Z","size":267,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-28T11:21:31.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/uphold.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2024-12-20T15:21:55.000Z","updated_at":"2025-01-03T14:56:49.000Z","dependencies_parsed_at":"2024-12-22T11:54:54.865Z","dependency_job_id":"4c0c1afa-52f3-4905-9ef6-5e5fa1abb1a5","html_url":"https://github.com/uphold/debino","commit_stats":null,"previous_names":["uphold/debino"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/debino/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252913129,"owners_count":21824104,"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":[],"created_at":"2024-12-27T07:19:26.185Z","updated_at":"2026-02-17T02:08:29.068Z","avatar_url":"https://github.com/uphold.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debino\n\n[![Tests](https://github.com/uphold/debino/actions/workflows/tests.yaml/badge.svg)](https://github.com/uphold/debino/actions/workflows/tests.yaml)\n[![Release](https://github.com/uphold/debino/actions/workflows/release.yaml/badge.svg)](https://github.com/uphold/debino/actions/workflows/release.yaml)\n\nA logging library that combines the simplicity and convenience of [debug](https://github.com/debug-js/debug) with the power of [pino](https://github.com/pinojs/pino).\n\n## Installation\n\n```bash\nnpm install @uphold/debino\n```\n\n## Usage\n\nBy default, similarly to `debug`'s behavior, loggers do not output any content. Each logger output can be selectively activated by using the `DEBUG` environment variable. Pattern matching is based on the logger's name and it can optionally contain colons (`:`) to create (sub)-components properties on the logger instance.\n\nA logger named `foo:bar:biz` creates a `pino` child logger with `name` equal to `foo`, property `component` equal to `bar` and `subcomponent` equal to `biz`.\n\nConsidering the following example:\n\n```js\n// example.js\nimport { debino } from '@uphold/debino';\n\nconst child1 = debino('foo');\nconst child2 = debino('foo:bar');\n\nchild1.debug('net');\nchild2.debug('qux');\n```\n\n*Example output with `DEBUG=foo*`*:\n\n```bash\nDEBUG=foo* node example.js\n\n{\"level\":20,\"time\":1734717092221,\"pid\":99831,\"hostname\":\"Andr-Cruz-0688L\",\"name\":\"foo\",\"msg\":\"net\"}\n{\"level\":20,\"time\":1734717092221,\"pid\":99831,\"hostname\":\"Andr-Cruz-0688L\",\"name\":\"foo\",\"component\":\"bar\",\"msg\":\"qux\"}\n```\n\n*Example output with `DEBUG=foo:bar`*:\n\n```bash\nDEBUG=foo:bar node example.js\n\n{\"level\":20,\"time\":1734717270874,\"pid\":1035,\"hostname\":\"Andr-Cruz-0688L\",\"name\":\"foo\",\"component\":\"bar\",\"msg\":\"qux\"}\n```\n\nThe `prefix` and `suffix` for each component is also customizable:\n\n```js\nconst child = debino('foo', { suffix: 'module' });\n```\n\nWhen creating a child logger, you may also pass any options accepted by `pino.child()` method:\n\n```js\nconst child = debino('foo', { redact: ['foo']});\n```\n\n### Log level\n\nThe `level` pino option is respected if the logger output is active.\n\n```js\nconst logger = debino('root')('foo', { level: 'info' });\n```\n\nYou may also set the log level via the `LOG_LEVEL` environment variable. However, the `level` option will always take precedence over it.\nIf both `level` and `LOG_LEVEL` are not set, it will use the value from\nthe root logger (See the [Root Logger](#root-logger) section below for more information).\n\n### Root logger\n\nEvery call to `debino` creates a child logger based on a root logger. The default root logger is an instance returned by `pino({ level: 'debug' })`. You may set your own root logger by calling `setRootLogger()`:\n\n```js\nimport { debino, pino, setRootLogger } from '@uphold/debino';\n\n// Call this as soon as possible in your application.\nsetRootLogger(pino({ redact: ['foo'] }));\n\nconst logger = debino('foo');\n```\n\n## License\n\n[MIT](./LICENSE)\n\n## Contributing\n\n### Development\n\nInstall dependencies:\n\n```bash\nnpm i\n```\n\nRun tests:\n\n```bash\nnpm run test\n```\n\n### Cutting a release\n\nThe release process is automated via the [release](https://github.com/uphold/debino/actions/workflows/release.yaml) GitHub workflow. Run it by clicking the \"Run workflow\" button.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fdebino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fdebino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fdebino/lists"}