{"id":22096495,"url":"https://github.com/uphold/debugnyan","last_synced_at":"2025-07-24T22:32:01.731Z","repository":{"id":34930828,"uuid":"39001290","full_name":"uphold/debugnyan","owner":"uphold","description":"A logging library that combines the simplicity and convenience of debug with the power of bunyan","archived":false,"fork":false,"pushed_at":"2025-05-15T11:39:38.000Z","size":294,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-06-13T08:06:16.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"conda-forge/prompt_toolkit-feedstock","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,"zenodo":null}},"created_at":"2015-07-13T08:49:08.000Z","updated_at":"2025-05-12T12:45:28.000Z","dependencies_parsed_at":"2024-06-18T16:54:11.121Z","dependency_job_id":"dce707cf-902b-43fa-a346-25e65d3c2b57","html_url":"https://github.com/uphold/debugnyan","commit_stats":{"total_commits":41,"total_committers":12,"mean_commits":"3.4166666666666665","dds":0.6097560975609756,"last_synced_commit":"b17984efc60d77d3b2ecf7c85e9030ff01bc84e2"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/uphold/debugnyan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebugnyan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebugnyan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebugnyan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebugnyan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/debugnyan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdebugnyan/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266913680,"owners_count":24005579,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"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-12-01T04:11:15.356Z","updated_at":"2025-07-24T22:32:01.384Z","avatar_url":"https://github.com/uphold.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debugnyan\n\nA logging library that combines the simplicity and convenience of [debug](https://github.com/visionmedia/debug) with the power of [bunyan](https://github.com/trentm/node-bunyan).\n\n## Status\n\n[![npm version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n\n## Installation\n\nInstall the package via `yarn`:\n\n```sh\n❯ yarn add debugnyan\n```\n\nor via `npm`:\n\n```sh\n❯ npm install debugnyan --save\n```\n\n## Usage\n\nCreate a logger by giving it a namespace and then call [bunyan's log methods](https://github.com/trentm/node-bunyan#log-method-api) on the returned instance.\n\nBy default, similarly to `debug`'s behaviour, loggers do not output any content. Each logger output can be selectively activated by using the `DEBUG` environment variable.\nPattern matching is based on the logger's name and it can optionally contain colons (`:`) to create (sub)-components properties on the logger instance.\n\nConsider a logger named `foo:bar:biz`:\n\n- this creates a `bunyan` logger with name `foo`\n- and a `bunyan` (simple) child logger with property `component` equal to `bar`.\n\n```js\nconst logger1 = require('debugnyan')('foo');\nconst logger2 = require('debugnyan')('foo:bar');\n\nlogger1.debug('net');\nlogger2.debug('qux');\n```\n\n*Example output with `DEBUG=foo`*:\n\n```bash\nDEBUG=foo node example.js\n\n{\"name\":\"foo\",\"hostname\":\"ruimarinho\",\"pid\":1,\"level\":20,\"msg\":\"net\",\"time\":\"2016-10-04T18:54:14.530Z\",\"v\":0}\n{\"name\":\"foo\",\"hostname\":\"ruimarinho\",\"pid\":1,\"component\":\"bar\",\"level\":20,\"msg\":\"qux\",\"time\":\"2016-10-04T18:54:14.531Z\",\"v\":0}\n```\n\n*Example output with `DEBUG=foo:bar`*:\n\n```bash\nDEBUG=foo:bar node example.js\n\n{\"name\":\"foo\",\"hostname\":\"ruimarinho\",\"pid\":2,\"component\":\"bar\",\"level\":20,\"msg\":\"qux\",\"time\":\"2016-10-04T18:55:08.217Z\",\"v\":0}\n```\n\nThe `prefix` and `suffix` for each component is also customizable:\n\n```js\nconst logger = require('debugnyan')('foo', {}, { suffix: 'module' });\n```\n\nWhen creating a _child_ logger you may also override the default `simple` behavior:\n\n```js\nconst logger = require('debugnyan')('foo', {}, { suffix: 'module', simple: false });\n```\n\n### Log level\n\nThe `level` bunyan option is respected if the logger output is active.\n\n```js\nconst logger = require('debugnyan')('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.\n\n## Tests\n\n```\n❯ yarn test\n```\n\n## Release\n\nClick `Run Workflow` on the [release github action](https://github.com/uphold/debugnyan/actions/workflows/release.yaml).\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/debugnyan.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/debugnyan\n[travis-image]: https://img.shields.io/travis/uphold/debugnyan.svg?style=flat-square\n[travis-url]: https://travis-ci.org/uphold/debugnyan\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fdebugnyan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fdebugnyan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fdebugnyan/lists"}