From b5dc5a04562775444930ad93c829a1e681f10ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Degros?= Date: Thu, 28 Apr 2022 18:01:23 +1000 Subject: [PATCH] Log a "Loading" progress message once per second --- lib/log.h | 2 +- lib/tree.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/log.h b/lib/log.h index 3f1409b..748c016 100644 --- a/lib/log.h +++ b/lib/log.h @@ -77,7 +77,7 @@ class Beat { using Duration = Clock::duration; // Beat period. - const Duration period_ = std::chrono::milliseconds(100); + const Duration period_ = std::chrono::milliseconds(1000); // Next beat time. TimePoint next_ = Clock::now() + period_; diff --git a/lib/tree.cc b/lib/tree.cc index 0cf5588..272d955 100644 --- a/lib/tree.cc +++ b/lib/tree.cc @@ -339,7 +339,7 @@ void Tree::BuildTree() { // Add zip entries for all items except hardlinks for (zip_int64_t id = 0; id < n; ++id) { if (should_display_progress) - Log(LOG_DEBUG, "Indexing... ", 100 * id / n, "%"); + Log(LOG_INFO, "Loading ", 100 * id / n, "%"); if (zip_stat_index(zip_, id, zipFlags, &sb) < 0) throw ZipError(StrCat("Cannot read entry #", id), zip_);