From e970ac6c02befabccd897d65294859ee73d8910f Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 20 Jan 2018 13:09:51 -0500 Subject: [PATCH] crawl: make logging less verbose Silence the three(!) log messages per crawl increment an extra one at the end of the subvol. The three critical messages per subvol crawl cycle are: Next transid in BeesCrawlState :0 offset 0x0 transid .. started (s ago) Subvol has been completely scanned and a new transaction range will be created. CrawlState is the state of the old subvol. Restarted crawl BeesCrawlState :0 offset 0x0 transid .. started (0s ago) Subvol has been restarted. CRawlState is the state of the new subvol. Deferring next transid in BeesCrawlState :0 offset 0x0 transid .. started (0s ago) Subvol has been completely scanned, but it is too soon to start a new scan. Fix the "Restart..." message to use the correct verb tense and to use the correct BeesCrawlState data. Signed-off-by: Zygo Blaxell --- src/bees-roots.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 6e07ea8..434b402 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -720,9 +720,9 @@ BeesCrawl::next_transid() crawl_state.m_objectid = 0; crawl_state.m_offset = 0; crawl_state.m_started = current_time; - BEESLOGINFO("Restarting crawl " << get_state()); BEESCOUNT(crawl_restart); set_state(crawl_state); + BEESLOGINFO("Restarted crawl " << get_state()); return true; } @@ -738,7 +738,7 @@ BeesCrawl::fetch_extents() } BEESNOTE("crawling " << get_state()); - BEESLOGINFO("Crawling " << get_state()); + // BEESLOGINFO("Crawling " << get_state()); Timer crawl_timer; @@ -773,11 +773,11 @@ BeesCrawl::fetch_extents() if (!ioctl_ok || sk.m_result.empty()) { BEESCOUNT(crawl_empty); - BEESLOGINFO("Crawl empty " << get_state()); + // BEESLOGINFO("Crawl empty " << get_state()); return next_transid(); } - BEESLOGINFO("Crawling " << sk.m_result.size() << " results from " << get_state()); + // BEESLOGINFO("Crawling " << sk.m_result.size() << " results from " << get_state()); auto results_left = sk.m_result.size(); BEESNOTE("crawling " << results_left << " results from " << get_state()); size_t count_other = 0; @@ -873,7 +873,7 @@ BeesCrawl::fetch_extents() } } } - BEESLOGINFO("Crawled inline " << count_inline << " data " << count_data << " other " << count_other << " unknown " << count_unknown << " gen_low " << count_low << " gen_high " << count_high << " " << get_state() << " in " << crawl_timer << "s"); + // BEESLOGINFO("Crawled inline " << count_inline << " data " << count_data << " other " << count_other << " unknown " << count_unknown << " gen_low " << count_low << " gen_high " << count_high << " " << get_state() << " in " << crawl_timer << "s"); return true; }