Permalink
Browse files

changed the two instances of "console.error('(node) warning:" to cons…

…ole.warn
  • Loading branch information...
FugueNation committed Dec 28, 2011
1 parent ef2a011 commit bfc4af69ff24a95bfa23ee0175de6d853920d9c0
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/eventemitter2.js
View
@@ -110,7 +110,7 @@
if (m > 0 && tree._listeners.length > m) {
tree._listeners.warned = true;
- console.error('(node) warning: possible EventEmitter memory ' +
+ console.warn('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
tree._listeners.length);
@@ -289,7 +289,7 @@
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
- console.error('(node) warning: possible EventEmitter memory ' +
+ console.warn('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);

2 comments on commit bfc4af6

@0x00A

This comment has been minimized.

Show comment Hide comment
@0x00A

0x00A Feb 8, 2012

Node.js-core throws errors. If you have a compelling reason for this i'll definitely reconsider.

0x00A replied Feb 8, 2012

Node.js-core throws errors. If you have a compelling reason for this i'll definitely reconsider.

@FugueNation

This comment has been minimized.

Show comment Hide comment
@FugueNation

FugueNation Feb 8, 2012

Owner

The message text clearly says 'warning', which leads me to believe I'd want its output on console.warn, especially in the case I'm logging console output by levels. Seems very rational and obvious to me. However if core is putting warnings on the console.error channel, even if it seems weird, I guess sticking with precedent is better. So you can just close this one. No problem!

Owner

FugueNation replied Feb 8, 2012

The message text clearly says 'warning', which leads me to believe I'd want its output on console.warn, especially in the case I'm logging console output by levels. Seems very rational and obvious to me. However if core is putting warnings on the console.error channel, even if it seems weird, I guess sticking with precedent is better. So you can just close this one. No problem!

Please sign in to comment.