Removed spamy debugging messages

This commit is contained in:
WolverinDEV 2020-04-02 01:19:36 +02:00
parent 75b5192801
commit a126bd16d4
3 changed files with 8 additions and 8 deletions

View File

@ -139,7 +139,7 @@ void ProtocolHandler::execute_resend() {
this->handle->close_connection(); this->handle->close_connection();
return; return;
} }
log_trace(category::connection, tr("Resended {}"), resended); //log_trace(category::connection, tr("Resended {}"), resended);
auto socket = this->handle->get_socket(); auto socket = this->handle->get_socket();
if(socket) { if(socket) {
@ -165,7 +165,7 @@ void ProtocolHandler::progress_packet(const pipes::buffer_view &buffer) {
auto packet_type = packet->type(); auto packet_type = packet->type();
auto packet_id = packet->packetId(); auto packet_id = packet->packetId();
auto ordered = packet_type.type() == protocol::COMMAND || packet_type.type() == protocol::COMMAND_LOW; auto ordered = packet_type.type() == protocol::COMMAND || packet_type.type() == protocol::COMMAND_LOW;
log_trace(category::connection, tr("Received packet {} with id {}"), packet->type().name(), packet->packetId()); //log_trace(category::connection, tr("Received packet {} with id {}"), packet->type().name(), packet->packetId());
/* special handling */ /* special handling */
if(packet_type.type() == protocol::INIT1) { if(packet_type.type() == protocol::INIT1) {
@ -255,7 +255,7 @@ void ProtocolHandler::progress_packet(const pipes::buffer_view &buffer) {
unique_lock queue_lock(read_queue.buffer_lock); unique_lock queue_lock(read_queue.buffer_lock);
if(ordered) { /* ordered */ if(ordered) { /* ordered */
log_trace(category::connection, tr("Inserting packet {} with id {}"), packet->type().name(), packet->packetId()); //log_trace(category::connection, tr("Inserting packet {} with id {}"), packet->type().name(), packet->packetId());
if(!read_queue.insert_index(packet_id, std::forward<shared_ptr<ServerPacket>>(packet))) { if(!read_queue.insert_index(packet_id, std::forward<shared_ptr<ServerPacket>>(packet))) {
log_warn(category::connection, tr("Failed to insert ordered packet into queue. ({} | {} | {})"), packet_type.name(), read_queue.current_index(), packet_id); log_warn(category::connection, tr("Failed to insert ordered packet into queue. ({} | {} | {})"), packet_type.name(), read_queue.current_index(), packet_id);
} }
@ -530,7 +530,7 @@ void ProtocolHandler::send_command(const ts::Command &cmd, const std::function<v
if(ack_callback) if(ack_callback)
ack_callback(f); ack_callback(f);
log_trace(category::connection, tr("Time needed for command: {}ms. Success: {}"), chrono::duration_cast<chrono::milliseconds>(end - begin).count(), f); //log_trace(category::connection, tr("Time needed for command: {}ms. Success: {}"), chrono::duration_cast<chrono::milliseconds>(end - begin).count(), f);
}); });
} }
packet->enable_flag(PacketFlag::NewProtocol); packet->enable_flag(PacketFlag::NewProtocol);
@ -555,7 +555,7 @@ void ProtocolHandler::send_packet(const std::shared_ptr<ts::protocol::ClientPack
} }
} }
log_trace(category::connection, tr("Split up {} {} to {} packets. Ack waiting: {}"), packet->packetId(), packet->type().name(), result.size(), this->acknowledge_handler.awaiting_acknowledge()); //log_trace(category::connection, tr("Split up {} {} to {} packets. Ack waiting: {}"), packet->packetId(), packet->type().name(), result.size(), this->acknowledge_handler.awaiting_acknowledge());
auto socket = this->handle->get_socket(); auto socket = this->handle->get_socket();
if(!socket) { if(!socket) {
log_error(category::connection, tr("Failed to get socket!")); log_error(category::connection, tr("Failed to get socket!"));

View File

@ -18,7 +18,7 @@ using namespace ts;
void ProtocolHandler::handlePacketAck(const std::shared_ptr<ts::protocol::ServerPacket> &ack) { void ProtocolHandler::handlePacketAck(const std::shared_ptr<ts::protocol::ServerPacket> &ack) {
string error; string error;
log_trace(category::connection, tr("Handle packet acknowledge for {}"), be2le16(&ack->data()[0])); //log_trace(category::connection, tr("Handle packet acknowledge for {}"), be2le16(&ack->data()[0]));
if(!this->acknowledge_handler.process_acknowledge(ack->type().type(), ack->data(), error)) { if(!this->acknowledge_handler.process_acknowledge(ack->type().type(), ack->data(), error)) {
log_warn(category::connection, tr("Failed to handle acknowledge {}: {}"), be2le16(&ack->data()[0]) ,error); log_warn(category::connection, tr("Failed to handle acknowledge {}: {}"), be2le16(&ack->data()[0]) ,error);
} }
@ -35,7 +35,7 @@ void ProtocolHandler::handlePacketCommand(const std::shared_ptr<ts::protocol::Se
log_error(category::connection, tr("Failed to parse command (exception): {}"), ex.what()); log_error(category::connection, tr("Failed to parse command (exception): {}"), ex.what());
return; return;
} }
log_trace(category::connection, tr("Handing command {}"), command->command()); //log_trace(category::connection, tr("Handing command {}"), command->command());
if(command->command() == "initivexpand") { if(command->command() == "initivexpand") {
this->handleCommandInitIVExpend(*command); this->handleCommandInitIVExpend(*command);

View File

@ -496,7 +496,7 @@ NAN_METHOD(ServerConnection::send_command) {
cmd[strobf("hwid").string()] = system_uuid(); /* we dont want anybody to patch this out */ cmd[strobf("hwid").string()] = system_uuid(); /* we dont want anybody to patch this out */
} }
} }
log_trace(category::audio, tr("Sending data {}"), cmd.command());
this->protocol_handler->send_command(cmd); this->protocol_handler->send_command(cmd);
auto end = chrono::system_clock::now(); auto end = chrono::system_clock::now();
} }