-
Notifications
You must be signed in to change notification settings - Fork 865
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
Added enable option and support the level 'disable' #53
Conversation
@@ -321,6 +325,10 @@ function onExit (fn) { | |||
} | |||
} | |||
|
|||
// added private disable level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's private, should we prefix a _, also make it non-enumerable?
also suggest silent
- which makes more sense in the level context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's private because it gets cloned and looked up later.
👍 on silent
@davidmarkclements any other update? I renamed this to silent. We might want to make it non-enumerable, you are right. I will have have a look at that. |
@davidmarkclements using silent level. Any other feedback? |
// private property | ||
Object.defineProperty(nums, '100', { | ||
value: 'silent', | ||
enumerable: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enumerable: false is default, doesn't need to be set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, I've left it there for increased readability.
👍 happy |
oh but wait - what about docs? |
perfection. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
as per #52
This should provide the groundwork for disabling the logger programmatically. I will wait for @davidmarkclements to review this (he is on holiday).
Seems like #47, @nkint can you have a look as well?