Skip to content

Commit

Permalink
refactor(logging): replace console.log with console.info for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 29, 2024
1 parent 3b0564a commit 5dbeed4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config/deno-kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export async function listenQueue(kv: Deno.Kv) {
`,
});

console.log(
console.info(
`Processing ${rawPropertiesCount.rows[0].count} raw properties`,
);

Expand Down Expand Up @@ -305,7 +305,7 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (updateResult.rowCount === 1) {
console.log("1 record updated in lamudi_raw_data");
console.info("1 record updated in lamudi_raw_data");
}

const updateListingResult = await transaction.queryObject({
Expand All @@ -322,7 +322,7 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (updateListingResult.rowCount === 1) {
console.log(
console.info(
"Listing updated with new price and price_formatted",
);
}
Expand All @@ -347,7 +347,7 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (updatePropertyResult.rowCount === 1) {
console.log(
console.info(
"Property updated with new images, agent_name, product_owner_name, and project_name",
);
}
Expand Down Expand Up @@ -433,7 +433,7 @@ export async function listenQueue(kv: Deno.Kv) {
}

if (property.rowCount && property.rowCount > 0) {
console.log(
console.info(
"Newly created property ID:",
property.rows[0].id,
);
Expand Down Expand Up @@ -476,7 +476,7 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (newListing.rowCount && newListing.rowCount > 0) {
console.log(
console.info(
"Newly created listing ID:",
newListing.rows[0].id,
);
Expand All @@ -492,7 +492,7 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (updateResult.rowCount === 1) {
console.log("1 record updated in lamudi_raw_data");
console.info("1 record updated in lamudi_raw_data");
}
} catch (error) {
throw error;
Expand All @@ -502,7 +502,7 @@ export async function listenQueue(kv: Deno.Kv) {
}

await transaction.commit();
console.log("Transaction successfully committed");
console.info("Transaction successfully committed");
} catch (error) {
if (transaction) {
try {
Expand Down

0 comments on commit 5dbeed4

Please sign in to comment.