1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +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>();
CSH->uuid = vm["uuid"].as<std::string>();
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"))
{
session["host"].Bool() = true;
session["hostConnections"].String() = vm["lobby-connections"].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>();
auto address = cmdLineOptions["lobby"].as<std::string>();
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)
connectToRemote(address, port);