Skip to content

Commit 1148b1b

Browse files
Update logger.js
Fixed missing context object...
1 parent 56a4cff commit 1148b1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/logger.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ exports.config = (config, levels) => {
9494
},
9595
context: (context) => {
9696
return {
97-
remaining:
97+
remaining: context &&
9898
context.getRemainingTimeInMillis &&
9999
context.getRemainingTimeInMillis(),
100-
function: context.functionName && context.functionName,
101-
memory: context.memoryLimitInMB && context.memoryLimitInMB,
100+
function: context && context.functionName && context.functionName,
101+
memory: context && context.memoryLimitInMB && context.memoryLimitInMB,
102102
};
103103
},
104104
custom: (custom) =>

0 commit comments

Comments
 (0)