Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix Debuggers #126

Closed
desvdp opened this issue Sep 6, 2015 · 1 comment
Closed

Prefix Debuggers #126

desvdp opened this issue Sep 6, 2015 · 1 comment
Assignees

Comments

@desvdp
Copy link

desvdp commented Sep 6, 2015

Regarding the use of the "debug" library: Would it be possible to prefix the debugger in such the messages can be easily filtered (very handy when embedding this library)

Required changes:
lib/HAPServer.js :1

var debug = require('debug')('HAPNodeJS:HAPServer');

lib/util/eventedhttp.js :1

var debug = require('debug')('HAPNodeJS:EventedHTTPServer');

lib/Accessory.js :1

var debug = require('debug')('HAPNodeJS:Accessory');

small change no need for pull requests I guess ...

Reference:

https://www.npmjs.com/package/debug#conventions

Conventions

If you're using this in one or more of your libraries, you should use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you should prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".

Thanks.

@Supereg
Copy link
Member

Supereg commented Apr 19, 2020

This change was incorporated into the latest beta version and be part of the future 0.7.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants