From 4bfc3eb945f6bfdb6d272ac64c8b71b1a13ce769 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 12 Oct 2021 10:52:37 +0300 Subject: [PATCH] Remove logging of FileDb operations. --- td/telegram/files/FileDb.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/td/telegram/files/FileDb.cpp b/td/telegram/files/FileDb.cpp index df92f5d60..06a0ec530 100644 --- a/td/telegram/files/FileDb.cpp +++ b/td/telegram/files/FileDb.cpp @@ -85,15 +85,15 @@ class FileDb final : public FileDbInterface { } pmc.erase(PSTRING() << "file" << id.get()); - LOG(DEBUG) << "ERASE " << format::as_hex_dump<4>(Slice(PSLICE() << "file" << id.get())); + // LOG(DEBUG) << "ERASE " << format::as_hex_dump<4>(Slice(PSLICE() << "file" << id.get())); if (!remote_key.empty()) { pmc.erase(remote_key); - LOG(DEBUG) << "ERASE remote " << format::as_hex_dump<4>(Slice(remote_key)); + // LOG(DEBUG) << "ERASE remote " << format::as_hex_dump<4>(Slice(remote_key)); } if (!local_key.empty()) { pmc.erase(local_key); - LOG(DEBUG) << "ERASE local " << format::as_hex_dump<4>(Slice(local_key)); + // LOG(DEBUG) << "ERASE local " << format::as_hex_dump<4>(Slice(local_key)); } if (!generate_key.empty()) { pmc.erase(generate_key); @@ -215,10 +215,10 @@ class FileDb final : public FileDbInterface { if (file_data.generate_ != nullptr && new_generate) { generate_key = as_key(*file_data.generate_); } - LOG(DEBUG) << "SAVE " << id.get() << " -> " << file_data << " " - << tag("remote_key", format::as_hex_dump<4>(Slice(remote_key))) - << tag("local_key", format::as_hex_dump<4>(Slice(local_key))) - << tag("generate_key", format::as_hex_dump<4>(Slice(generate_key))); + // LOG(DEBUG) << "SAVE " << id.get() << " -> " << file_data << " " + // << tag("remote_key", format::as_hex_dump<4>(Slice(remote_key))) + // << tag("local_key", format::as_hex_dump<4>(Slice(local_key))) + // << tag("generate_key", format::as_hex_dump<4>(Slice(generate_key))); send_closure(file_db_actor_, &FileDbActor::store_file_data, id, serialize(file_data), remote_key, local_key, generate_key); } @@ -237,7 +237,7 @@ class FileDb final : public FileDbInterface { static Result load_file_data_impl(ActorId file_db_actor_id, SqliteKeyValue &pmc, const string &key, FileDbId current_pmc_id) { - //LOG(DEBUG) << "Load by key " << format::as_hex_dump<4>(Slice(key)); + // LOG(DEBUG) << "Load by key " << format::as_hex_dump<4>(Slice(key)); TRY_RESULT(id, get_id(pmc, key)); vector ids; @@ -264,8 +264,8 @@ class FileDb final : public FileDbInterface { if (ids.size() > 1) { send_closure(file_db_actor_id, &FileDbActor::optimize_refs, std::move(ids), id); } - //LOG(DEBUG) << "By ID " << id.get() << " found data " << format::as_hex_dump<4>(Slice(data_str)); - //LOG(INFO) << attempt_count; + // LOG(DEBUG) << "By ID " << id.get() << " found data " << format::as_hex_dump<4>(Slice(data_str)); + // LOG(INFO) << attempt_count; log_event::WithVersion parser(data_str); parser.set_version(static_cast(Version::Initial)); @@ -281,7 +281,7 @@ class FileDb final : public FileDbInterface { static Result get_id(SqliteKeyValue &pmc, const string &key) TD_WARN_UNUSED_RESULT { auto id_str = pmc.get(key); - //LOG(DEBUG) << "Found ID " << id_str << " by key " << format::as_hex_dump<4>(Slice(key)); + // LOG(DEBUG) << "Found ID " << id_str << " by key " << format::as_hex_dump<4>(Slice(key)); if (id_str.empty()) { return Status::Error("There is no such a key in database"); }