Skip to content

Commit 145297d

Browse files
committed
refactor: show individual event association logs
1 parent 0963817 commit 145297d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ class ServerlessLambdaEdgePreExistingCloudFront {
2323
const events = functionObj.events.filter(
2424
(event) => event.preExistingCloudFront && this.checkAllowedDeployStage()
2525
)
26-
26+
this.serverless.cli.consoleLog(
27+
`${functionArn} is associating to ${resolvedDistributionId} CloudFront Distribution. waiting for deployed status.`
28+
)
2729
for (let idx = 0; idx < events.length; idx += 1) {
2830
const event = events[idx]
2931

@@ -35,9 +37,6 @@ class ServerlessLambdaEdgePreExistingCloudFront {
3537
? this.resolveCfImportValue(this.provider, event.preExistingCloudFront.distributionId['Fn::ImportValue'])
3638
: event.preExistingCloudFront.distributionId
3739
)
38-
this.serverless.cli.consoleLog(
39-
`${functionArn} is associating to ${resolvedDistributionId} CloudFront Distribution. waiting for deployed status.`
40-
)
4140

4241
let retryCount = 5
4342

@@ -83,7 +82,8 @@ class ServerlessLambdaEdgePreExistingCloudFront {
8382
}
8483

8584
await updateDistribution()
86-
this.serverless.cli.consoleLog(`${functionArn} has been successfully associated to ${resolvedDistributionId} CloudFront Distribution.`)
85+
86+
this.serverless.cli.consoleLog(`Event ${event.preExistingCloudFront.eventType - event.preExistingCloudFront.pathPattern} has been successfully associated to ${resolvedDistributionId} CloudFront Distribution.`)
8787
}
8888
})
8989
}, Promise.resolve())

0 commit comments

Comments
 (0)