Skip to content

Commit

Permalink
Give rollbar loggers the correct context
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Nason committed Nov 7, 2017
1 parent b1da984 commit 1ccf8a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util/client/rollbarLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/server/rollbarLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1ccf8a2

Please sign in to comment.