Improve some logging.

GitOrigin-RevId: ec0a2f01c45b1ae7a74cd407f5c867e609e47d1f
This commit is contained in:
levlam 2018-08-28 05:52:43 +03:00
parent 45d42b6417
commit 5379348651
3 changed files with 9 additions and 4 deletions

View File

@ -9219,7 +9219,7 @@ void ContactsManager::on_chat_update(telegram_api::chat &chat) {
on_update_chat_photo(c, chat_id, std::move(chat.photo_));
on_update_chat_active(c, chat_id, is_active);
on_update_chat_migrated_to_channel_id(c, chat_id, migrated_to_channel_id);
LOG_IF(ERROR, !is_active && !migrated_to_channel_id.is_valid()) << chat_id << " is deactivated in " << debug_str;
LOG_IF(INFO, !is_active && !migrated_to_channel_id.is_valid()) << chat_id << " is deactivated in " << debug_str;
update_chat(c, chat_id);
}

View File

@ -17144,12 +17144,15 @@ Result<MessagesManager::InputMessageContent> MessagesManager::process_input_mess
auto r_http_url = parse_url(input_message_invoice->photo_url_);
if (r_http_url.is_error()) {
if (!input_message_invoice->photo_url_.empty()) {
LOG(INFO) << "Can't register url " << input_message_invoice->photo_url_;
}
message_invoice->photo.id = -2;
} else {
auto url = r_http_url.ok().get_url();
auto r_invoice_file_id = td_->file_manager_->from_persistent_id(url, FileType::Temp);
if (r_invoice_file_id.is_error()) {
LOG(ERROR) << "Can't register url " << url;
LOG(INFO) << "Can't register url " << url;
message_invoice->photo.id = -2;
} else {
auto invoice_file_id = r_invoice_file_id.move_as_ok();
@ -24207,7 +24210,9 @@ void MessagesManager::update_message(Dialog *d, unique_ptr<Message> &old_message
<< " to " << *new_message->reply_markup;
} else {
LOG(ERROR) << message_id << " in " << dialog_id << " sent by " << old_message->sender_user_id
<< " has lost reply markup " << *old_message->reply_markup;
<< " has lost reply markup " << *old_message->reply_markup
<< ". Old message: " << to_string(get_message_object(dialog_id, old_message.get()))
<< ". New message: " << to_string(get_message_object(dialog_id, new_message.get()));
}
}
}

View File

@ -110,7 +110,7 @@ Result<size_t> HttpReader::read_next(HttpQuery *query) {
*source >> gzip_flow_;
source = &gzip_flow_;
} else {
LOG(ERROR) << "Unsupported " << tag("content-encoding", content_encoding_);
LOG(WARNING) << "Unsupported " << tag("content-encoding", content_encoding_);
return Status::Error(415, "Unsupported Media Type: unsupported content-encoding");
}