summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a4e92f8)
This handler assumes that ravenjs is already installed in a global
scope.
+return {
+ raven: function(msg, level, data) {
+ /* global window */
+ if(!window.Raven) {
+ return;
+ }
+
+ var ravenData = {};
+
+ if(data.exception) {
+ window.Raven.captureException(data.exception);
+ } else {
+ Object.keys(data || {}).forEach(function(key) {
+ ravenData[key] = data[key];
+ });
+ ravenData.tags = ravenData.tags || {};
+ ravenData.tags.level = level;
+ window.Raven.captureMessage(msg, ravenData);
+ }
+ }
+};
});
\ No newline at end of file
});
\ No newline at end of file