Improve logging.
GitOrigin-RevId: 90530bd13523ad525d93d67e0634524c1459c8e9
This commit is contained in:
parent
b63d6124f0
commit
a26d827a38
@ -8300,7 +8300,7 @@ void ContactsManager::on_update_chat_rights(Chat *c, ChatId chat_id, bool is_cre
|
|||||||
void ContactsManager::on_update_chat_participant_count(Chat *c, ChatId chat_id, int32 participant_count, int32 version,
|
void ContactsManager::on_update_chat_participant_count(Chat *c, ChatId chat_id, int32 participant_count, int32 version,
|
||||||
const string &debug_str) {
|
const string &debug_str) {
|
||||||
if (version <= -1) {
|
if (version <= -1) {
|
||||||
LOG(ERROR) << "Receive wrong version " << version << " from " << debug_str;
|
LOG(ERROR) << "Receive wrong version " << version << " in " << chat_id << " from " << debug_str;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8366,7 +8366,7 @@ void ContactsManager::on_update_chat_active(Chat *c, ChatId chat_id, bool is_act
|
|||||||
void ContactsManager::on_update_chat_migrated_to_channel_id(Chat *c, ChatId chat_id, ChannelId migrated_to_channel_id) {
|
void ContactsManager::on_update_chat_migrated_to_channel_id(Chat *c, ChatId chat_id, ChannelId migrated_to_channel_id) {
|
||||||
if (c->migrated_to_channel_id != migrated_to_channel_id && migrated_to_channel_id.is_valid()) {
|
if (c->migrated_to_channel_id != migrated_to_channel_id && migrated_to_channel_id.is_valid()) {
|
||||||
LOG_IF(ERROR, c->migrated_to_channel_id.is_valid())
|
LOG_IF(ERROR, c->migrated_to_channel_id.is_valid())
|
||||||
<< "Group upgraded to supergroup has changed from " << c->migrated_to_channel_id << " to "
|
<< "Upgraded supergroup ID for " << chat_id << " has changed from " << c->migrated_to_channel_id << " to "
|
||||||
<< migrated_to_channel_id;
|
<< migrated_to_channel_id;
|
||||||
c->migrated_to_channel_id = migrated_to_channel_id;
|
c->migrated_to_channel_id = migrated_to_channel_id;
|
||||||
c->need_send_update = true;
|
c->need_send_update = true;
|
||||||
@ -8397,7 +8397,7 @@ bool ContactsManager::on_update_chat_full_participants_short(ChatFull *chat_full
|
|||||||
void ContactsManager::on_update_chat_full_participants(ChatFull *chat_full, ChatId chat_id,
|
void ContactsManager::on_update_chat_full_participants(ChatFull *chat_full, ChatId chat_id,
|
||||||
vector<DialogParticipant> participants, int32 version) {
|
vector<DialogParticipant> participants, int32 version) {
|
||||||
if (version <= -1) {
|
if (version <= -1) {
|
||||||
LOG(ERROR) << "Receive members with wrong version " << version;
|
LOG(ERROR) << "Receive members with wrong version " << version << " in " << chat_id;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22398,7 +22398,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
|
|||||||
if (!G()->parameters().use_message_db) {
|
if (!G()->parameters().use_message_db) {
|
||||||
// can happen for bots if the message is received first through getMessage in an unknown chat without
|
// can happen for bots if the message is received first through getMessage in an unknown chat without
|
||||||
// last_new_message_id and only after that received through getDifference or getChannelDifference
|
// last_new_message_id and only after that received through getDifference or getChannelDifference
|
||||||
if (last_new_message_id.is_valid()) {
|
if (d->last_new_message_id.is_valid()) {
|
||||||
LOG(ERROR) << "Receive again " << (message->is_outgoing ? "outgoing" : "incoming")
|
LOG(ERROR) << "Receive again " << (message->is_outgoing ? "outgoing" : "incoming")
|
||||||
<< (message->forward_info == nullptr ? " not" : "") << " forwarded " << message_id
|
<< (message->forward_info == nullptr ? " not" : "") << " forwarded " << message_id
|
||||||
<< " with content of type " << message_content_type << " in " << dialog_id << " from " << source
|
<< " with content of type " << message_content_type << " in " << dialog_id << " from " << source
|
||||||
|
@ -1006,7 +1006,7 @@ Result<FileId> FileManager::register_file(FileData &&data, FileLocationSource fi
|
|||||||
|
|
||||||
auto status = check_local_location(data.local_.full(), data.size_);
|
auto status = check_local_location(data.local_.full(), data.size_);
|
||||||
if (status.is_error()) {
|
if (status.is_error()) {
|
||||||
LOG(WARNING) << "Invalid local location: " << status << " from " << source;
|
LOG(WARNING) << "Invalid " << data.local_.full() << ": " << status << " from " << source;
|
||||||
data.local_ = LocalFileLocation();
|
data.local_ = LocalFileLocation();
|
||||||
if (data.remote_.type() == RemoteFileLocation::Type::Partial) {
|
if (data.remote_.type() == RemoteFileLocation::Type::Partial) {
|
||||||
data.remote_ = {};
|
data.remote_ = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user