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

Debug logging while debugging is disabled #2698

Closed
milo526 opened this issue Oct 3, 2020 · 2 comments
Closed

Debug logging while debugging is disabled #2698

milo526 opened this issue Oct 3, 2020 · 2 comments

Comments

@milo526
Copy link

milo526 commented Oct 3, 2020

In my homebridge-tuya-web plugin I created some helper functions to aid in debugging.

These helper functions make use of the platform.log.log(level, message, args) call.
It turns out that calling platform.log.debug(msg) properly disables itself when debugging is disabled, the same however does not apply to platform.log.log('debug', message, args)

platform.log.debug("This does not get printed with debug disabled");
platform.log.log("debug", "This does get printed with debug disabled.")

If this is not by design, I would like to create a PR to fix this.
If this is by design I will alter my plugin to use the debug call directly.

@Supereg
Copy link
Member

Supereg commented Oct 3, 2020

Thanks for pointing this out. Will be fixed with the next release.

@Supereg
Copy link
Member

Supereg commented Oct 5, 2020

Fix was added to the beta channel and released as v1.3.0-beta.6. Thanks for reporting.

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

No branches or pull requests

2 participants