Improve logging.

This commit is contained in:
levlam 2022-11-13 11:11:18 +03:00
parent f6f94e5255
commit 73049c6c89

View File

@ -1107,10 +1107,14 @@ FileId FileManager::create_file_id(int32 file_node_id, FileNode *file_node) {
void FileManager::try_forget_file_id(FileId file_id) {
auto *info = get_file_id_info(file_id);
if (info->send_updates_flag_ || info->pin_flag_ || info->sent_file_id_flag_) {
LOG(DEBUG) << "Can't forget file " << file_id << ", because of"
<< (info->send_updates_flag_ ? " (sent updates)" : "") << (info->pin_flag_ ? " (pin)" : "")
<< (info->sent_file_id_flag_ ? " (sent file identifier)" : "");
return;
}
auto file_node = get_file_node(file_id);
if (file_node->main_file_id_ == file_id) {
LOG(DEBUG) << "Can't forget main file " << file_id;
return;
}