updated logging for API calls

This commit is contained in:
Viet Huynh
2023-11-02 02:42:28 +07:00
parent 6f1ba625c0
commit ac535c927a
5 changed files with 44 additions and 24 deletions
+7 -3
View File
@@ -118,15 +118,15 @@ await readFile(resolve(`./${blocklistFilename}`), (line, rl) => {
}
});
const numberOfLists = Math.ceil(domains.length / LIST_ITEM_SIZE);
console.log("\n\n");
console.log(`Number of processed domains: ${processedDomainCount}`);
console.log(`Number of duplicate domains: ${duplicateDomainCount}`);
console.log(`Number of unnecessary domains: ${unnecessaryDomainCount}`);
console.log(`Number of blocked domains: ${domains.length}`);
console.log(`Number of allowed domains: ${allowedDomainCount}`);
console.log(
`Number of lists to be created: ${Math.ceil(domains.length / LIST_ITEM_SIZE)}`
);
console.log(`Number of lists to be created: ${numberOfLists}`);
console.log("\n\n");
(async () => {
@@ -137,6 +137,10 @@ console.log("\n\n");
return;
}
console.log(
`Creating ${numberOfLists} lists for ${domains.length} domains...`
);
if (FAST_MODE) {
await createZeroTrustListsAtOnce(domains);
return;