Improve logging.

GitOrigin-RevId: b361ebec579228514f4531465144d49aeb2cd7b5
This commit is contained in:
levlam 2018-08-22 04:04:09 +03:00
parent b31b8f2bd7
commit c12ed8d9cc
3 changed files with 5 additions and 5 deletions

View File

@ -506,8 +506,8 @@ Status SessionConnection::on_main_packet(const PacketInfo &info, Slice packet) {
callback_->on_connected(); callback_->on_connected();
} }
VLOG(raw_mtproto) << "Got packet: [session_id:" << format::as_hex(info.session_id) << "] " VLOG(raw_mtproto) << "Got packet of size " << packet.size() << " from session " << format::as_hex(info.session_id)
<< format::as_hex_dump<4>(packet); << ":" << format::as_hex_dump<4>(packet);
if (info.no_crypto_flag) { if (info.no_crypto_flag) {
return Status::Error("Unencrypted packet"); return Status::Error("Unencrypted packet");
} }

View File

@ -204,8 +204,8 @@ void Transport::write_crypto_impl(int X, const Storer &storer, const AuthKey &au
HeaderT *header, size_t data_size) { HeaderT *header, size_t data_size) {
auto real_data_size = storer.store(header->data); auto real_data_size = storer.store(header->data);
CHECK(real_data_size == data_size); CHECK(real_data_size == data_size);
VLOG(raw_mtproto) << "SEND" << format::as_hex_dump<4>(Slice(header->data, data_size)); VLOG(raw_mtproto) << "Send packet of size " << data_size << " to session " << format::as_hex(info->session_id) << ":"
// LOG(ERROR) << "SEND" << format::as_hex_dump<4>(Slice(header->data, data_size)) << info->version; << format::as_hex_dump<4>(Slice(header->data, data_size));
size_t size = 0; size_t size = 0;
if (info->version == 1) { if (info->version == 1) {

View File

@ -149,7 +149,7 @@ void LanguagePackManager::start_up() {
database_ = add_language_database(G()->shared_config().get_option_string("language_database_path")); database_ = add_language_database(G()->shared_config().get_option_string("language_database_path"));
auto language = add_language(database_, language_pack_, language_code_); auto language = add_language(database_, language_pack_, language_code_);
LOG(INFO) << "Use language pack " << language_pack_ << " with language " << language_code_ << " of version " LOG(INFO) << "Use language pack \"" << language_pack_ << "\" with language \"" << language_code_ << "\" of version "
<< language->version_.load() << " with database \"" << database_->path_ << '"'; << language->version_.load() << " with database \"" << database_->path_ << '"';
} }