Permalink
Browse files

Give rollbar loggers the correct context

  • Loading branch information...
Mike Nason
Mike Nason committed Nov 7, 2017
1 parent b1da984 commit 1ccf8a27d5c607f65ce6c4f96869a8fefe6f3395
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/util/client/rollbarLogger.js
  2. +1 −1 src/util/server/rollbarLogger.js
@@ -48,7 +48,7 @@ ClientRollbarLogger.prototype.write = function (data = {}) {
// https://rollbar.com/docs/notifier/rollbar.js/#rollbarlog
const logFn = global.Rollbar[rollbarLevelName];
if (isFunction(logFn)) {
logFn(data.msg, data.err, scopeData);
logFn.call(global.Rollbar, data.msg, data.err, scopeData);
} else {
global.Rollbar.error(data.msg, data.err, scopeData);
}
@@ -37,7 +37,7 @@ ServerRollbarLogger.prototype.write = function (data = {}) {
const logFn = this._rollbar[rollbarLevelName];
if (isFunction(logFn)) {
logFn(data.msg, data.err, data.req, payload);
logFn.call(this._rollbar, data.msg, data.err, data.req, payload);
} else {
this._rollbar.error(data.msg, data.err, data.req, payload);
}

0 comments on commit 1ccf8a2

Please sign in to comment.