mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Add method call for removing an appender. Patch by kixx
This commit is contained in:
parent
06c7c8909a
commit
e690b5a315
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user