aboutsummaryrefslogtreecommitdiffhomepage
path: root/tddb
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-11-17 15:47:59 +0300
committerlevlam <levlam@telegram.org>2025-11-17 15:47:59 +0300
commitff20e1b6b5a5acf617a97a39e7403aa66cf0e014 (patch)
treeaab0295694287f50d73172d6a78895beda2a8ba5 /tddb
parent05e759c12e84b00f5c55c8f2794c8db2e5ffb790 (diff)
Improve log messages.
Diffstat (limited to 'tddb')
-rw-r--r--tddb/td/db/binlog/Binlog.cpp10
1 files changed, 6 insertions, 4 deletions
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<double>(start_size) / static_cast<double>(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));