{"id":13806227,"url":"https://github.com/salsify/ember-debug-logger","last_synced_at":"2025-10-28T09:13:54.358Z","repository":{"id":2090883,"uuid":"37742746","full_name":"salsify/ember-debug-logger","owner":"salsify","description":"An Ember addon for attaching debug logging to container-managed objects","archived":false,"fork":false,"pushed_at":"2024-02-07T15:09:33.000Z","size":618,"stargazers_count":36,"open_issues_count":7,"forks_count":6,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-05-24T09:07:32.264Z","etag":null,"topics":["npm"],"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/salsify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-06-19T19:51:20.000Z","updated_at":"2024-04-24T01:36:29.000Z","dependencies_parsed_at":"2024-06-18T18:24:52.102Z","dependency_job_id":"61c7cade-a618-4b65-9cf0-85a973a724a9","html_url":"https://github.com/salsify/ember-debug-logger","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fember-debug-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fember-debug-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fember-debug-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fember-debug-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salsify","download_url":"https://codeload.github.com/salsify/ember-debug-logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Fember-debug-logger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259104095,"owners_count":22805808,"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":["npm"],"created_at":"2024-08-04T01:01:09.153Z","updated_at":"2025-10-28T09:13:49.317Z","avatar_url":"https://github.com/salsify.png","language":"JavaScript","readme":"# ember-debug-logger [![Build Status](https://travis-ci.org/salsify/ember-debug-logger.svg?branch=master)](https://travis-ci.org/salsify/ember-debug-logger)\n\n`ember-debug-logger` exposes the [visionmedia/debug](https://github.com/visionmedia/debug) library for use in your Ember.js application.\n\nInstallation\n------------------------------------------------------------------------------\n\n`ember install ember-debug-logger`\n\n## Usage\n\nThe [debug library](https://github.com/visionmedia/debug) is available for standard use by import:\n\n```js\nimport debug from 'debug';\n\nconst log = debug('demo-namespace');\n\nlog('Hello, world');\n```\n\n![image](https://cloud.githubusercontent.com/assets/108688/8261895/117445f0-169c-11e5-913e-941e82dd2a52.png)\n\n### Enabling Namespaces During Debugging\n\nDuring development, you can enable logging for particular namespaces calling `debug.enable` in the developer console. Your preferences will be persisted in local storage, but they're only checked when a logger is instantiated, so in most cases you'll need to refresh the page to see them take effect.\n\nEnabled namespaces follow simple globbing rules, so to enable logging for everything, you could use:\n\n```js\ndebug.enable('*');\n```\n\nTo enable only logging coming from the application route:\n\n```js\ndebug.enable('route:application');\n```\n\nYou can mix and match as well. To enable logging for all routes and the `foo-bar` service, for instance:\n\n```js\ndebug.enable('route:*, service:foo-bar');\n```\n\nYou can turn off all logging with `disable`:\n\n```\ndebug.disable();\n```\n\nNamespaces will automatically be differentiated by color, and the time between messages will be logged.\n\n![image](https://cloud.githubusercontent.com/assets/108688/8263047/624cd006-16a5-11e5-9ba8-bd67d5ce5d7b.png)\n\n\n### Automatic Namespacing\n\nThis addon exports a `debugLogger` function you can attach to a class definition. The resulting method will automatically use its instance's container key as the namespace.\n\n```js\n// app/routes/index.js\nimport Route from '@ember/route';\nimport debugLogger from 'ember-debug-logger';\n\nexport default Route.extend({\n  debug: debugLogger();\n\n  activate() {\n    this.debug('Hello from the application index.');\n  }\n});\n```\n\n![image](https://cloud.githubusercontent.com/assets/108688/8262107/e0e71bb8-169d-11e5-9b74-9a895ed7e418.png)\n","funding_links":[],"categories":["Packages"],"sub_categories":["Debugging / Profiling"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsify%2Fember-debug-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalsify%2Fember-debug-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsify%2Fember-debug-logger/lists"}