Skip to content

Commit 1ccf8a2

Browse files
author
Mike Nason
committed
Give rollbar loggers the correct context
1 parent b1da984 commit 1ccf8a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/util/client/rollbarLogger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ClientRollbarLogger.prototype.write = function (data = {}) {
4848
// https://rollbar.com/docs/notifier/rollbar.js/#rollbarlog
4949
const logFn = global.Rollbar[rollbarLevelName];
5050
if (isFunction(logFn)) {
51-
logFn(data.msg, data.err, scopeData);
51+
logFn.call(global.Rollbar, data.msg, data.err, scopeData);
5252
} else {
5353
global.Rollbar.error(data.msg, data.err, scopeData);
5454
}

src/util/server/rollbarLogger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ServerRollbarLogger.prototype.write = function (data = {}) {
3737
const logFn = this._rollbar[rollbarLevelName];
3838

3939
if (isFunction(logFn)) {
40-
logFn(data.msg, data.err, data.req, payload);
40+
logFn.call(this._rollbar, data.msg, data.err, data.req, payload);
4141
} else {
4242
this._rollbar.error(data.msg, data.err, data.req, payload);
4343
}

0 commit comments

Comments
 (0)