kopia lustrzana https://github.com/c9/core
Merge pull request +10415 from c9/vfs-worker-raygun
VFS worker raygunpull/223/head
commit
9a04db6908
|
@ -29,6 +29,11 @@ function plugin(options, imports, register) {
|
||||||
warning: new raygun.Client().init({ apiKey: options.keys.warning })
|
warning: new raygun.Client().init({ apiKey: options.keys.warning })
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var customClients = options.customClients || {};
|
||||||
|
for (var client in customClients) {
|
||||||
|
clients[client] = new raygun.Client().init({ apiKey: customClients[client] });
|
||||||
|
}
|
||||||
|
|
||||||
for (var client in clients) {
|
for (var client in clients) {
|
||||||
client = clients[client];
|
client = clients[client];
|
||||||
client._send = client.send;
|
client._send = client.send;
|
||||||
|
@ -38,11 +43,9 @@ function plugin(options, imports, register) {
|
||||||
|
|
||||||
return this._send.apply(this, arguments);
|
return this._send.apply(this, arguments);
|
||||||
};
|
};
|
||||||
|
client.setVersion(options.version + ".0");
|
||||||
}
|
}
|
||||||
|
|
||||||
clients.error.setVersion(options.version + ".0");
|
|
||||||
clients.warning.setVersion(options.version + ".0");
|
|
||||||
|
|
||||||
graceful.on("destroy", function(err) {
|
graceful.on("destroy", function(err) {
|
||||||
if (!err) return graceful.emit("destroyComplete");
|
if (!err) return graceful.emit("destroyComplete");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
@ -57,6 +60,9 @@ function plugin(options, imports, register) {
|
||||||
Client: clients.error,
|
Client: clients.error,
|
||||||
errorClient: clients.error,
|
errorClient: clients.error,
|
||||||
warningClient: clients.warning,
|
warningClient: clients.warning,
|
||||||
|
customClient: function(name) {
|
||||||
|
return client[name];
|
||||||
|
},
|
||||||
customData: customData
|
customData: customData
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue