Skip to content

Commit

Permalink
Eliminate duplicate message
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Beltran <pablo.beltrancasso@sematext.com>
  • Loading branch information
PabloB94 committed May 24, 2023
1 parent 89b5dfa commit bbe315e
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions lib/plugins/output-filter/vercel-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,26 @@ function parseVercelLog (log) {
initDuration.initDuration = +lambdaVals[4].match(initDurationRegex)[1]
}
const logDetails = extractLogDetails(message)

return {
...logDetails,
message,
duration,
billedDuration,
memorySize,
maxMemoryUsed,
...initDuration,
...rest
if (logDetails === message) {
return {
message,
duration,
billedDuration,
memorySize,
maxMemoryUsed,
...initDuration,
...rest
}
} else {
return {
...logDetails,
duration,
billedDuration,
memorySize,
maxMemoryUsed,
...initDuration,
...rest
}
}
}

Expand Down

0 comments on commit bbe315e

Please sign in to comment.