Node: global.console.debug() does not log as in the documentation

Created on 16 May 2018  Â·  4Comments  Â·  Source: nodejs/node

  • Version: v8.7.0
  • Platform: Windows 10 x64
  • Subsystem:


Simply typing into nodethe following line does not print:

> global.console.debug(2)
undefined

Although documentation states:

The console.debug() function is an alias for console.log()

I see the implementation here: https://github.com/nodejs/node/blob/master/lib/console.js#L201
But I suspect it's not applied to the global console object here: https://github.com/nodejs/node/blob/master/lib/internal/bootstrap/node.js#L352

Or maybe it's something else.

question

All 4 comments

This was added 8.10.0 and 9.3.0. You can update to a newer 8.x version if you're looking to get this functionality.

Also FYI there are docs for each version — the version of the docs you're looking at is 10.1.0. Here are the docs for 8.7.0: https://nodejs.org/docs/v8.7.0/api/console.html

To switch to the docs for a different version, use the "View another version" menu thing-y at the top of the nodejs.org doc pages.

Thank you!
But it states:

Added in: v8.0.0

Is that an error in the doc?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Icemic picture Icemic  Â·  3Comments

loretoparisi picture loretoparisi  Â·  3Comments

addaleax picture addaleax  Â·  3Comments

dfahlander picture dfahlander  Â·  3Comments

filipesilvaa picture filipesilvaa  Â·  3Comments