Commit abda616f authored by Nikola Hardi's avatar Nikola Hardi
Browse files

Connection manager - logging updates

1. Reduce reconnect log messages from Error to info
2. Replace cout printing with ROOT logging methods
parent 381664cc
Pipeline #2098425 passed with stage
in 11 minutes and 9 seconds
......@@ -239,9 +239,9 @@ TGridResult *TJAlien::Command(const char *command, bool interactive, UInt_t stre
break;
}
if (--retries_left == 0)
Error("Command", "Failed to execute the command");
Info("Command", "Failed to execute the command");
else {
Error("Command", "Trying to reconnect in 1 sec");
Info("Command", "Trying to reconnect in 1 sec");
sleep(1);
Connect();
}
......
......@@ -61,16 +61,18 @@ int TJAlienConnectionManager::CreateConnection()
return 0;
}
std::cout << "\r" << "Opening connection to JCentral. Please wait" << std::flush;
// std::cout << "\r" << "Opening connection to JCentral. Please wait" << std::flush;
Info("TJAlienConnectionManager", "Opening connection to JCentral. Please wait");
for (int i = 0; i < dns_jcentral.lenght(); i++)
{
std::cout << "." << std::flush;
// std::cout << "." << std::flush;
current_host = dns_jcentral.get_next_host();
ConnectJCentral(co, current_host);
Info("TJAlienConnectionManager", "Opening connection to %s", current_host.c_str());
if (connection_flag)
{
std::cout << "\r" << std::flush;
// std::cout << "\r" << std::flush;
Info("TJAlienConnectionManager", "Successfully connected to %s", current_host.c_str());
co.password = "";
fWSHost = default_server;
......@@ -82,7 +84,7 @@ int TJAlienConnectionManager::CreateConnection()
else
{
if (gDebug > 0) {
std::cout << "\r" << std::flush;
// std::cout << "\r" << std::flush;
Error("TJAlienConnectionManager", "Failed to connect to %s - retrying...", current_host.c_str());
}
sleep(1);
......@@ -90,7 +92,7 @@ int TJAlienConnectionManager::CreateConnection()
}
creds.removeCredentials(co.kind);
}
std::cout << "\r" << std::flush;
// std::cout << "\r" << std::flush;
Error("TJAlienConnectionManager", "Failed to connect to any server! Giving up");
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment