callbackAddress = _callbackAddress;
ports = _ports;
// Logging
- log.open("RoomSmart_Stub_cpp.log");
+ int i=0;
+ string file = "RoomSmart_Stub_cpp" + to_string(i) + ".log";
+ while (ifstream(file.c_str())) {
+ i++;
+ file = "RoomSmart_Stub_cpp" + to_string(i) + ".log";
+ }
+ log.open(file);
log << "Port: " << _port << endl;
log << "Skeleton address: " << _skeletonAddress << endl;
log << "Callback address: " << callbackAddress << endl;