Skip to content

Commit

Permalink
improves logging
Browse files Browse the repository at this point in the history
  • Loading branch information
asliwinski committed Mar 1, 2024
1 parent a8bd44b commit 8c939ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async function handler(event: HandlerEvent) {
);

console.log(
`From ${originalSize}, Saved: ${(originalSize - output.length) / originalSize}%`,
`From ${originalSize}, To ${output.length}, Saved: ${(((originalSize - output.length) * 100) / originalSize).toFixed(0)}%`,
);

let body = output.toString("base64");
Expand Down Expand Up @@ -256,7 +256,7 @@ export default async function (
);

console.log(
`From ${originalSize}, Saved: ${(originalSize - output.length) / originalSize}%`,
`From ${originalSize}, To ${output.length}, Saved: ${(((originalSize - output.length) * 100) / originalSize).toFixed(0)}%`,
);

// let body = output.toString("base64");
Expand Down

0 comments on commit 8c939ea

Please sign in to comment.