Add method call for removing an appender. Patch by kixx

This commit is contained in:
Dan Mills 2009-02-20 01:54:45 -08:00
parent 06c7c8909a
commit e690b5a315

View File

@ -222,6 +222,15 @@ Logger.prototype = {
this._appenders.push(appender);
},
removeAppender: function Logger_removeAppender(appender) {
let newAppenders = [];
for (let i = 0; i < this._appenders.length; i++) {
if (this._appenders[i] != appender)
newAppenders.push(this._appenders[i]);
}
this._appenders = newAppenders;
},
log: function Logger_log(message) {
if (this.level > message.level)
return;