Skip to content

Commit f9f3b89

Browse files
committed
fix: logging broken in cloudwatch
1 parent 30601bb commit f9f3b89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/interceptor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function interceptConsole() {
162162
if (!currentContext) return;
163163

164164
log(`Console ${type}`, JSON.stringify(args));
165-
const message = args?.shift();
165+
const [message, ...rest] = args ?? [];
166166

167167
const key = `Function#${
168168
process.env[envVariableNames.SSPY_FUNCTION_NAME]
@@ -174,7 +174,7 @@ function interceptConsole() {
174174
console: {
175175
type,
176176
message,
177-
optionalParams: args,
177+
optionalParams: rest,
178178
},
179179
});
180180

0 commit comments

Comments
 (0)