Skip to content

The default level has some problems #30

@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

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