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

Added enable option and support the level 'disable' #53

Merged
merged 5 commits into from
Jun 6, 2016
Merged

Conversation

mcollina
Copy link
Member

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?

@@ -321,6 +325,10 @@ function onExit (fn) {
}
}

// added private disable level
Copy link
Member

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

Copy link
Member Author

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

@mcollina
Copy link
Member Author

mcollina commented Jun 6, 2016

@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.

@mcollina
Copy link
Member Author

mcollina commented Jun 6, 2016

@davidmarkclements using silent level.

Any other feedback?

// private property
Object.defineProperty(nums, '100', {
value: 'silent',
enumerable: false
Copy link
Member

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

Copy link
Member Author

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.

@davidmarkclements
Copy link
Member

👍 happy

@davidmarkclements
Copy link
Member

oh but wait - what about docs?

@davidmarkclements
Copy link
Member

perfection.

@mcollina mcollina merged commit a2f70d0 into master Jun 6, 2016
@mcollina mcollina deleted the disable branch June 6, 2016 16:31
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants