Open
Description
var Log = exports = module.exports = function Log(level, stream){
if ('string' == typeof level) level = exports[level.toUpperCase()];
this.level = isFinite(level) ? level : this.DEBUG; // here
this.stream = stream || process.stdout;
if (this.stream.readable) this.read();
};
the comments of // here
,it's exports.DEBUG
rather than this.DEBUG
. Because the value of this.DEBUG
is undefined
, so nothing would ouput
exports[levelStr] <= this.level // false forever
<
3E97
div class="Box-sc-g0xbh4-0 HpFDd CommentDivider-module__CommentDividerLeftLine--wJYhx">
Metadata
Metadata
Assignees
Labels
No labels