Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default level has some problems #30

Open
vincentgor opened this issue Sep 22, 2016 · 0 comments
Open

The default level has some problems #30

vincentgor opened this issue Sep 22, 2016 · 0 comments

Comments

@vincentgor
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant