Improve log messages.

GitOrigin-RevId: b33eacf1de0f88c6cc0a8208ab82099cd9e1be83
This commit is contained in:
levlam 2018-01-25 19:01:10 +03:00
parent 43fc1ac4b3
commit 0fa92bdb87
2 changed files with 6 additions and 4 deletions

View File

@ -2203,11 +2203,12 @@ void StickersManager::on_load_sticker_set_from_database(int64 sticker_set_id, bo
auto old_sticker_count = sticker_set->sticker_ids.size();
{
LOG_IF(ERROR, sticker_set->is_changed)
<< "Sticker set " << sticker_set_id << " was changed before it is loaded from database";
LOG_IF(ERROR, sticker_set->is_changed) << "Sticker set with" << (with_stickers ? "" : "out") << " stickers "
<< sticker_set_id << " was changed before it is loaded from database";
LogEventParser parser(value);
parse_sticker_set(sticker_set, parser);
LOG_IF(ERROR, sticker_set->is_changed) << "Sticker set " << sticker_set_id << " is changed";
LOG_IF(ERROR, sticker_set->is_changed)
<< "Sticker set with" << (with_stickers ? "" : "out") << " stickers " << sticker_set_id << " is changed";
parser.fetch_end();
parser.get_status().ensure();
}

View File

@ -159,7 +159,8 @@ void StickersManager::parse_sticker_set(StickerSet *sticker_set, T &parser) {
parse(access_hash, parser);
CHECK(sticker_set->id == sticker_set_id);
if (sticker_set->access_hash != access_hash) {
LOG(ERROR) << "Sticker set " << sticker_set_id << " access hash has changed";
LOG(ERROR) << "Sticker set " << sticker_set_id << " access hash has changed from " << access_hash << " to "
<< sticker_set->access_hash;
}
if (sticker_set->is_inited) {