1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Add additional logging

This commit is contained in:
nordsoft 2022-11-11 18:00:09 +04:00
parent d691925b1f
commit eeeca5ba8d
2 changed files with 3 additions and 0 deletions

View File

@ -499,11 +499,13 @@ int main(int argc, char * argv[])
session["address"].String() = vm["lobby-address"].as<std::string>(); session["address"].String() = vm["lobby-address"].as<std::string>();
CSH->uuid = vm["uuid"].as<std::string>(); CSH->uuid = vm["uuid"].as<std::string>();
session["port"].Integer() = vm["lobby-port"].as<ui16>(); session["port"].Integer() = vm["lobby-port"].as<ui16>();
logGlobal->info("Remote lobby mode at %s:%d, uuid is %s", session["address"].String(), session["port"].Integer(), CSH->uuid);
if(vm.count("lobby-host")) if(vm.count("lobby-host"))
{ {
session["host"].Bool() = true; session["host"].Bool() = true;
session["hostConnections"].String() = vm["lobby-connections"].as<std::string>(); session["hostConnections"].String() = vm["lobby-connections"].as<std::string>();
session["hostUuid"].String() = vm["lobby-uuid"].as<std::string>(); session["hostUuid"].String() = vm["lobby-uuid"].as<std::string>();
logGlobal->info("This client will host session, server uuid is %s", session["hostUuid"].String());
} }
} }

View File

@ -205,6 +205,7 @@ void CVCMIServer::establishRemoteConnections()
int numOfConnections = cmdLineOptions["connections"].as<ui8>(); int numOfConnections = cmdLineOptions["connections"].as<ui8>();
auto address = cmdLineOptions["lobby"].as<std::string>(); auto address = cmdLineOptions["lobby"].as<std::string>();
int port = cmdLineOptions["lobby-port"].as<ui16>(); int port = cmdLineOptions["lobby-port"].as<ui16>();
logGlobal->info("Server is connecting to remote at %s:%d with uuid %d times", address, port, uuid, numOfConnections);
for(int i = 0; i < numOfConnections; ++i) for(int i = 0; i < numOfConnections; ++i)
connectToRemote(address, port); connectToRemote(address, port);