8000 The default level has some problems · Issue #30 · tj/log.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The default level has some problems #30
Open
@vincentgor

Description

@vincentgor
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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0