Improve log messages.

This commit is contained in:
levlam 2021-03-09 01:06:38 +03:00
parent 45b21b1f33
commit 92d8d1b9fd

View File

@ -13082,7 +13082,7 @@ void ContactsManager::on_update_chat_participant(ChatId chat_id, UserId user_id,
} }
if (!chat_id.is_valid() || !user_id.is_valid() || date <= 0 || if (!chat_id.is_valid() || !user_id.is_valid() || date <= 0 ||
(old_participant == nullptr && new_participant == nullptr)) { (old_participant == nullptr && new_participant == nullptr)) {
LOG(ERROR) << "Receive invalid updateChatParticipant in " << chat_id << " for " << user_id << " at " << date << ": " LOG(ERROR) << "Receive invalid updateChatParticipant in " << chat_id << " by " << user_id << " at " << date << ": "
<< to_string(old_participant) << " -> " << to_string(new_participant); << to_string(old_participant) << " -> " << to_string(new_participant);
return; return;
} }
@ -13127,7 +13127,7 @@ void ContactsManager::on_update_channel_participant(ChannelId channel_id, UserId
} }
if (!channel_id.is_valid() || !user_id.is_valid() || date <= 0 || if (!channel_id.is_valid() || !user_id.is_valid() || date <= 0 ||
(old_participant == nullptr && new_participant == nullptr)) { (old_participant == nullptr && new_participant == nullptr)) {
LOG(ERROR) << "Receive invalid updateChannelParticipant in " << channel_id << " for " << user_id << " at " << date LOG(ERROR) << "Receive invalid updateChannelParticipant in " << channel_id << " by " << user_id << " at " << date
<< ": " << to_string(old_participant) << " -> " << to_string(new_participant); << ": " << to_string(old_participant) << " -> " << to_string(new_participant);
return; return;
} }