Skip to content

Commit 19c6f76

Browse files
add more info to logs
1 parent 0cfd72e commit 19c6f76

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/avatax/scripts/cleanup-client-logs.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ const main = async () => {
4040
.entities(logsByCheckoutOrOrderId, logsByDateEntity);
4141

4242
if (values["dry-run"]) {
43-
console.log(`Would delete logs for lte: ${endDate.toISOString()}`);
43+
console.log(
44+
`Would delete logs from ${env.DYNAMODB_LOGS_TABLE_NAME} for lte: ${endDate.toISOString()}`,
45+
);
4446
return;
4547
}
4648

47-
console.log(`Deleting logs for lte: ${endDate.toISOString()}`);
49+
console.log(
50+
`Deleting logs fron ${env.DYNAMODB_LOGS_TABLE_NAME} for lte: ${endDate.toISOString()}`,
51+
);
4852

4953
do {
5054
const page = await command
@@ -64,6 +68,10 @@ const main = async () => {
6468
})
6569
.send();
6670

71+
console.log(
72+
`Deleting ${page.Items?.length} logs with ${JSON.stringify(page.LastEvaluatedKey)}`,
73+
);
74+
6775
for (const item of page?.Items ?? []) {
6876
if (item.checkoutOrOrderId) {
6977
await logsByCheckoutOrOrderId

0 commit comments

Comments
 (0)