From ff20e1b6b5a5acf617a97a39e7403aa66cf0e014 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 17 Nov 2025 15:47:59 +0300 Subject: Improve log messages. --- tddb/td/db/binlog/Binlog.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tddb') diff --git a/tddb/td/db/binlog/Binlog.cpp b/tddb/td/db/binlog/Binlog.cpp index 989ea8256..834eeb5c4 100644 --- a/tddb/td/db/binlog/Binlog.cpp +++ b/tddb/td/db/binlog/Binlog.cpp @@ -703,12 +703,14 @@ void Binlog::do_reindex() { auto ratio = static_cast(start_size) / static_cast(finish_size + 1); [&](Slice msg) { - if (start_size > (10 << 20) || finish_time - start_time > 1) { - LOG(WARNING) << "Slow " << msg; + if (finish_time - start_time > 1) { + LOG(WARNING) << "Slow regenerate " << msg; + } else if (start_size > (10 << 20)) { + LOG(WARNING) << "Large " << msg; } else { - LOG(INFO) << msg; + LOG(INFO) << "Regenerate " << msg; } - }(PSLICE() << "Regenerate index " << tag("name", path_) << tag("time", format::as_time(finish_time - start_time)) + }(PSLICE() << "index " << tag("name", path_) << tag("time", format::as_time(finish_time - start_time)) << tag("before_size", format::as_size(start_size)) << tag("after_size", format::as_size(finish_size)) << tag("ratio", ratio) << tag("before_events", start_events) << tag("after_events", finish_events)); -- cgit v1.2.3