aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/logger.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/logger.ts b/src/util/logger.ts
index 4df9fb7..49dcd86 100644
--- a/src/util/logger.ts
+++ b/src/util/logger.ts
@@ -18,6 +18,18 @@ export class Logger {
console.error(nano.red(data));
}
+ public progress(
+ current: number,
+ total: number,
+ config?: { title: string; description: string }
+ ) {
+ console.clear();
+ if (config?.title) {
+ this.alert(config.title);
+ }
+ console.log(`${current}/${total} ${config?.description || ""}`);
+ }
+
public logCountry(country: FetchedCountry) {
console.log(
nano.cyan("Country:"),