mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add log.removeHandler function
This commit is contained in:
@@ -114,6 +114,12 @@ var log = module.exports = {
|
||||
addHandler: function(func) {
|
||||
logHandlers.push(func);
|
||||
},
|
||||
removeHandler: function(func) {
|
||||
var index = logHandlers.indexOf(func);
|
||||
if (index > -1) {
|
||||
logHandlers.splice(index,1);
|
||||
}
|
||||
},
|
||||
log: function(msg) {
|
||||
msg.timestamp = Date.now();
|
||||
logHandlers.forEach(function(handler) {
|
||||
|
Reference in New Issue
Block a user