Skip to content

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

Description

@domfarolino

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.

Activity

  1. added
    consoleIssues and PRs related to the console subsystem.
    on May 4, 2018
  2. ryzokuken commented on Jun 7, 2018

    @ryzokuken
    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?

  3. TimothyGu commented on Jun 7, 2018

    @TimothyGu
    Member

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

  4. domfarolino commented on Jun 7, 2018

    @domfarolino
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    consoleIssues and PRs related to the console subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions