console: console.dir() bypasses inspect() methods

Use the `customInspect: false` option of `util.inspect()` to bypass any custom
inspect() function on the object being logged.

Closes #2717.
This commit is contained in:
Nathan Rajlich committed 2013-03-12 13:15:03 -07:00
1 parent 43c1830e0a
commit da8b0eefde
3 files changed
+15 -3

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ Console.prototype.error = Console.prototype.warn;
Console.prototype.dir = function(object) {
this._stdout.write(util.inspect(object) + '\n');
this._stdout.write(util.inspect(object, { customInspect: false }) + '\n');
};