Skip to content

Commit 3ab2c9b

Browse files
committed
small fixes.
1 parent 7ef2d64 commit 3ab2c9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ module.exports = function (options, handler) {
213213
};
214214

215215
moesifMiddleware.startCaptureOutgoing = function() {
216-
console.log('Inside Start capturing');
216+
logMessage(options.debug, 'startCaptureOutgoing', 'initiating outgoing');
217217
if (moesifMiddleware._mo_patch) {
218218
logMessage(
219219
options.debug,
@@ -366,7 +366,8 @@ function constructBaseLogData(
366366

367367

368368
function logEvent(event, context, err, result, options, moesifController) {
369-
if (!event.httpMethod || !event.headers) {
369+
// v1 has httpMethod, v2 has requestContext
370+
if ((!event.httpMethod && !event.requestContext) || !event.headers) {
370371
logMessage(
371372
options.debug,
372373
'logEvent',

0 commit comments

Comments
 (0)