Merge pull request +6406 from c9/worker-logging

Worker logging
pull/39/head^2
Lennart Kats 2015-03-03 10:46:26 +01:00
commit 341d5a8c7a
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -29,6 +29,18 @@ function plugin(options, imports, register) {
warning: new raygun.Client().init({ apiKey: options.keys.warning })
};
for (var client in clients) {
client = clients[client];
client._send = client.send;
client.send = function(exception, customData, callback, request) {
var ex = exception;
if (!exception.stack)
ex = new Error(exception.message || exception);
return this._send(ex, customData, callback, request);
};
}
clients.error.setVersion(options.version + ".0");
clients.warning.setVersion(options.version + ".0");