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

console: countReset() should dispatch a warning on non-existent counts #20524

Closed
domfarolino opened this issue May 4, 2018 · 3 comments
Closed
Labels
console Issues and PRs related to the console subsystem.

Comments

@domfarolino
Copy link
Contributor

We're in the midst of spec'ing console.countReset() to give a warning. Currently node's implementation does not give a warning. The spec PR for this is at whatwg/console#133. I imagine this will be really similar to #20442, and I can submit a PR for this really soon. Filing an issue for now.

@devsnek devsnek added the console Issues and PRs related to the console subsystem. label May 4, 2018
@ryzokuken
Copy link
Contributor

There's no warnings I know of yet in Node 10 (https://nodejs.org/dist/latest-v10.x/docs/api/console.html#console_console_countreset_label_default). How should we proceed with this?

@TimothyGu
Copy link
Member

The spec for countReset doesn't quite specify a warning either… @domfarolino could you clarify what we should do?

@domfarolino
Copy link
Contributor Author

domfarolino commented Jun 7, 2018

Sorry for the lack of clarity here in the spec. Right now, step 3 > substep 2 of countReset is the warning I allude to in this issue. We don't re-use logLevels in different functions, so the fact that Logger("countReset", ...) should produce a warning-like (and not just a regular) message is indicated in https://console.spec.whatwg.org/#loglevel-severity. The same pattern can be found for assert actually. But that sorta trend is changing actually, see:

for plans to make warning/error reporting more clear and easy to use. I have a PR for the node implementation here, just kinda got buried in other things, I'll try to submit soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues and PRs related to the console subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants