Changeset 32:aa5fdb101492 in rrlib_util


Ignore:
Timestamp:
23.08.2011 17:38:09 (8 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Adapted to new macros in rrlib_logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sFileIOUtils.cpp

    r29 r32  
    121121  if (system(sys_call.str().c_str()) == -1) 
    122122  { 
    123     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils>> Error creating dir: '%s'\n", path.c_str()); 
     123    RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils>> Error creating dir: '%s'\n", path.c_str()); 
    124124//     std::stringstream error_msg; 
    125125//     error_msg << "sFileIOUtils>> Error creating Dir:\n" 
     
    130130  else 
    131131  { 
    132 //     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils>> Directory: '%s' successfully created.\n", path.c_str()); 
     132//     RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils>> Directory: '%s' successfully created.\n", path.c_str()); 
    133133    return true; 
    134134  } 
     
    144144  if (fgets(buf, sizeof(buf), pipe) == 0) 
    145145  { 
    146     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::CreateTempfile() >> Error creating temp file!\n"); 
     146    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::CreateTempfile() >> Error creating temp file!\n"); 
    147147    exit(EXIT_FAILURE); 
    148148  } 
     
    172172  if (system(cmd.str().c_str()) != 0) 
    173173  { 
    174     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
     174    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
    175175    exit(EXIT_FAILURE); 
    176176  } 
     
    187187  if (system(cmd.str().c_str()) != 0) 
    188188  { 
    189     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
     189    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
    190190    exit(EXIT_FAILURE); 
    191191  } 
     
    228228      error_msg = "Unknown error"; 
    229229    } 
    230     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::%s >> Could not expand '%s': %s!\n", __FUNCTION__, file_name.c_str(), error_msg); 
     230    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::%s >> Could not expand '%s': %s!\n", __FUNCTION__, file_name.c_str(), error_msg); 
    231231    return false; 
    232232  } 
     
    285285std::string sFileIOUtils::GetHostName(bool fqdn) 
    286286{ 
    287   //RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::GetHostName() >>> started\n"); 
     287  //RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::GetHostName() >>> started\n"); 
    288288  std::string cmd = fqdn ? "hostname -f" : "hostname"; 
    289289  FILE * pipe = popen(cmd.c_str(), "r"); 
     
    291291  if (fgets(buf, sizeof(buf), pipe) == 0) 
    292292  { 
    293     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::GetHostName(bool fqdn) >> Error querying host name!\n"); 
     293    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::GetHostName(bool fqdn) >> Error querying host name!\n"); 
    294294    exit(EXIT_FAILURE); 
    295295  } 
     
    298298  sStringUtils::TrimWhitespace(name); 
    299299  //boost::trim(name); 
    300   //RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::GetHostName() >>> finished with name <%s>\n", name.c_str()); 
     300  //RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::GetHostName() >>> finished with name <%s>\n", name.c_str()); 
    301301  return name; 
    302302} // GetHostName() 
     
    313313  { 
    314314    address = * ((struct in_addr *) host_ent->h_addr_list[ 0 ]); 
    315     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "ip address of host <%s> = <%s>\n", name.c_str(), inet_ntoa(address)); 
    316   } 
    317   else 
    318   { 
    319     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::GetIpAddressOfHost() >>> could not get ip address of host <%s>\n", name.c_str()); 
     315    RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "ip address of host <%s> = <%s>\n", name.c_str(), inet_ntoa(address)); 
     316  } 
     317  else 
     318  { 
     319    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::GetIpAddressOfHost() >>> could not get ip address of host <%s>\n", name.c_str()); 
    320320  } 
    321321  return address; 
     
    328328struct in_addr sFileIOUtils::HostToIpViaNslookup(const std::string & name) 
    329329{ 
    330   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaNslookup() >>> started with host <%s>\n", name.c_str()); 
     330  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaNslookup() >>> started with host <%s>\n", name.c_str()); 
    331331  struct in_addr address; 
    332332  address.s_addr = 0; 
     
    334334  std::stringstream command; 
    335335  command << "nslookup \"" << name << "\""; 
    336   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "command = <%s>\n", command.str().c_str()); 
     336  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "command = <%s>\n", command.str().c_str()); 
    337337  FILE * pipe = popen(command.str().c_str(), "r"); 
    338338  if (!pipe) 
     
    348348  } 
    349349  pclose(pipe); 
    350   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaNslookup() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
     350  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaNslookup() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
    351351 
    352352  std::string result_str(result.str()); 
     
    355355  if (pos == std::string::npos) 
    356356  { 
    357     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
     357    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
    358358    return address; 
    359359  } 
    360360  result_str.erase(0, pos + search_token.length()); 
    361   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "pos = %zd\n", pos); 
     361  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "pos = %zd\n", pos); 
    362362 
    363363  search_token = "Address:"; 
     
    365365  if (pos == std::string::npos) 
    366366  { 
    367     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
     367    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
    368368    return address; 
    369369  } 
    370   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "pos = %zd\n", pos); 
     370  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "pos = %zd\n", pos); 
    371371 
    372372  std::string found_name(result_str.substr(0, pos)); 
     
    377377  //boost::trim(ip); 
    378378 
    379   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "found_name <%s> , name <%s> \n", found_name.c_str(), name.c_str()); 
     379  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "found_name <%s> , name <%s> \n", found_name.c_str(), name.c_str()); 
    380380 
    381381  if (found_name != name) 
    382382  { 
    383     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "nslookup failed .... returning <%s> \n", inet_ntoa(address)); 
     383    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "nslookup failed .... returning <%s> \n", inet_ntoa(address)); 
    384384    return address; 
    385385  } 
    386   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "found_name <%s> , ip <%s> \n", found_name.c_str(), ip.c_str()); 
     386  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "found_name <%s> , ip <%s> \n", found_name.c_str(), ip.c_str()); 
    387387 
    388388  inet_aton(ip.c_str(), &address); 
     
    398398struct in_addr sFileIOUtils::HostToIpViaHost(const std::string & name) 
    399399{ 
    400   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHost() >>> started with host <%s>\n", name.c_str()); 
     400  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHost() >>> started with host <%s>\n", name.c_str()); 
    401401  struct in_addr address; 
    402402  address.s_addr = 0; 
     
    404404  std::stringstream command; 
    405405  command << "host -t A \"" << name << "\""; 
    406   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "command = <%s>\n", command.str().c_str()); 
     406  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "command = <%s>\n", command.str().c_str()); 
    407407  FILE * pipe = popen(command.str().c_str(), "r"); 
    408408  if (!pipe) 
     
    418418  } 
    419419  pclose(pipe); 
    420   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHost() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
     420  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHost() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
    421421 
    422422  std::string result_str(result.str()); 
     
    425425 
    426426  for_each(tokens.begin(), tokens.end(), sStringUtils::Trim<std::string>()); 
    427   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHost() >>> got %d tokens:\n", tokens.size()); 
    428   copy(tokens.begin(), tokens.end(), std::ostream_iterator<std::string> (RRLIB_LOG_STREAM(rrlib::logging::eLL_DEBUG_VERBOSE_1), "\n")); 
     427  RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHost() >>> got %d tokens:\n", tokens.size()); 
     428  RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG_VERBOSE_1, Join(tokens, "\n")); 
    429429 
    430430  assert(tokens.size() == 4); 
    431   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "found_name <%s> , ip <%s> \n", tokens[0].c_str(), tokens[3].c_str()); 
     431  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "found_name <%s> , ip <%s> \n", tokens[0].c_str(), tokens[3].c_str()); 
    432432 
    433433  inet_aton(tokens[3].c_str(), &address); 
     
    440440struct in_addr sFileIOUtils::HostToIpViaHostsFile(const std::string & name) 
    441441{ 
    442   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHostsFile() >>> started with host <%s>\n", name.c_str()); 
     442  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHostsFile() >>> started with host <%s>\n", name.c_str()); 
    443443  struct in_addr address; 
    444444  address.s_addr = 0; 
     
    466466          { 
    467467            ip_address = *iter; 
    468             RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHostsFile() >>> got ip <%s> of host <%s> from hosts file\n", ip_address.c_str(), name.c_str()); 
     468            RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIpViaHostsFile() >>> got ip <%s> of host <%s> from hosts file\n", ip_address.c_str(), name.c_str()); 
    469469            found = true; 
    470470            break; 
     
    484484struct in_addr sFileIOUtils::HostToIp(const std::string & name) 
    485485{ 
    486   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> started with host <%s>\n", name.c_str()); 
     486  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> started with host <%s>\n", name.c_str()); 
    487487 
    488488  struct in_addr address; 
     
    491491  if ((address = sFileIOUtils::HostToIpViaHostsFile(name)).s_addr != 0) 
    492492  { 
    493     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> from hosts_file\n", inet_ntoa(address), name.c_str()); 
     493    RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> from hosts_file\n", inet_ntoa(address), name.c_str()); 
    494494  } 
    495495  else if ((address = sFileIOUtils::HostToIpViaHost(name)).s_addr != 0) 
    496496  { 
    497     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <host -t A>\n", inet_ntoa(address), name.c_str()); 
     497    RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <host -t A>\n", inet_ntoa(address), name.c_str()); 
    498498  } 
    499499  else if ((address = sFileIOUtils::HostToIpViaNslookup(name)).s_addr != 0) 
    500500  { 
    501     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <nslookup>\n", inet_ntoa(address), name.c_str()); 
    502   } 
    503   else 
    504   { 
    505     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::HostToIp() >>> could not get ip of host <%s>\n", name.c_str()); 
     501    RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <nslookup>\n", inet_ntoa(address), name.c_str()); 
     502  } 
     503  else 
     504  { 
     505    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::HostToIp() >>> could not get ip of host <%s>\n", name.c_str()); 
    506506  } 
    507507 
     
    531531  << target_directory; 
    532532 
    533   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFile() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
     533  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFile() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
    534534  int ret = system(rsync_command.str().c_str()); 
    535   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFile() >>> ... done.\n"); 
    536  
    537   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::RSyncFile() >>> finished with result %d\n", ret); 
     535  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFile() >>> ... done.\n"); 
     536 
     537  RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::RSyncFile() >>> finished with result %d\n", ret); 
    538538  return ret; 
    539539} // RSyncFile() 
     
    566566  << target_directory; 
    567567 
    568   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFiles() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
     568  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFiles() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
    569569  int ret = system(rsync_command.str().c_str()); 
    570   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFiles() >>> ... done.\n"); 
    571  
    572   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::RSyncFiles() >>> finished with result %d\n", ret); 
     570  RRLIB_LOG_PRINTF(rrlib::logging::eLL_USER, "sFileIOUtils::RSyncFiles() >>> ... done.\n"); 
     571 
     572  RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::RSyncFiles() >>> finished with result %d\n", ret); 
    573573  return ret; 
    574574} // RSyncFiles() 
     
    580580bool sFileIOUtils::CheckAndGetFile(const std::string &file_name, std::string &full_local_file_name, const std::string& resource_repository, const std::string& resource_server, const std::string& local_resource_directory, const std::string& server_resource_directory, bool use_cache) 
    581581{ 
    582   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> started with local_resource_directory <%s>, resource_repository <%s>, file_name <%s>, resource_server <%s>, server_resource_directory <%s>\n", local_resource_directory.c_str(), resource_repository.c_str(), file_name.c_str(), resource_server.c_str(), server_resource_directory.c_str()); 
     582  RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> started with local_resource_directory <%s>, resource_repository <%s>, file_name <%s>, resource_server <%s>, server_resource_directory <%s>\n", local_resource_directory.c_str(), resource_repository.c_str(), file_name.c_str(), resource_server.c_str(), server_resource_directory.c_str()); 
    583583 
    584584  //!##################################################################################################### 
     
    601601  full_local_file_name = "./" + resource_repository + file_name; 
    602602 
    603   RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 1. check: trying to load <%s>\n", full_local_file_name.c_str()); 
     603  RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 1. check: trying to load <%s>\n", full_local_file_name.c_str()); 
    604604  ifstream try_1(full_local_file_name.c_str()); 
    605605  if (try_1) 
     
    619619    if (!sFileIOUtils::ShellExpandFilename(expanded_local_resource_directory, local_resource_directory + "/")) 
    620620    { 
    621       RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::%s >> Could not expand local resource directory!\n", __FUNCTION__); 
     621      RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::%s >> Could not expand local resource directory!\n", __FUNCTION__); 
    622622      return false; 
    623623    } 
    624624    full_local_file_name = (expanded_local_resource_directory + resource_repository + file_name); 
    625625 
    626     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 2. check: trying to load <%s>\n", full_local_file_name.c_str()); 
     626    RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 2. check: trying to load <%s>\n", full_local_file_name.c_str()); 
    627627    ifstream try_2(full_local_file_name.c_str()); 
    628628    if (try_2) 
     
    642642      { 
    643643        local_host = sFileIOUtils::cached_local_host; 
    644         RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved local_host <%s> from cache\n", local_host.c_str()); 
     644        RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved local_host <%s> from cache\n", local_host.c_str()); 
    645645      } 
    646646      else 
     
    659659        { 
    660660          server_ip_address = pos->second; 
    661           RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved ip address <%s> of host <%s> from cache\n", server_ip_address.c_str(), server.c_str()); 
     661          RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved ip address <%s> of host <%s> from cache\n", server_ip_address.c_str(), server.c_str()); 
    662662        } 
    663663        else 
    664664        { 
    665665          server_ip_address = inet_ntoa(sFileIOUtils::HostToIp(server)); 
    666           RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> got ip address <%s> of host <%s>\n", server_ip_address.c_str(), server.c_str()); 
     666          RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> got ip address <%s> of host <%s>\n", server_ip_address.c_str(), server.c_str()); 
    667667 
    668668          if (server_ip_address == "0.0.0.0") 
    669669          { 
    670             RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::constructor >>> zero ip address ... clearing server\n"); 
     670            RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::constructor >>> zero ip address ... clearing server\n"); 
    671671            server = ""; 
    672672          } 
     
    681681      if (server != "")   //&& server != local_host) 
    682682      { 
    683         RRLIB_LOG_MESSAGE(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 3. check: trying to rsync <%s:%s> to <%s> \n", server_ip_address.c_str(), (server_resource_directory + resource_repository + file_name).c_str(), expanded_local_resource_directory.c_str()); 
     683        RRLIB_LOG_PRINTF(rrlib::logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 3. check: trying to rsync <%s:%s> to <%s> \n", server_ip_address.c_str(), (server_resource_directory + resource_repository + file_name).c_str(), expanded_local_resource_directory.c_str()); 
    684684 
    685685        // rsync from <resource_server:server_resource_directory + resource_repository> 
     
    688688        if (sFileIOUtils::RSyncFile("", server_ip_address, server_resource_directory + "/./" + resource_repository, file_name, expanded_local_resource_directory, "R") != 0) 
    689689        { 
    690           RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> could not rsync file <%s> from server <%s> at <%s> ... skipping\n", file_name.c_str(), server.c_str(), (server_resource_directory + resource_repository).c_str()); 
     690          RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> could not rsync file <%s> from server <%s> at <%s> ... skipping\n", file_name.c_str(), server.c_str(), (server_resource_directory + resource_repository).c_str()); 
    691691          return false; 
    692692        } 
     
    695695      else 
    696696      { 
    697         RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> could neither load <%s> locally nor from resource server ... skipping\n", file_name.c_str()); 
     697        RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> could neither load <%s> locally nor from resource server ... skipping\n", file_name.c_str()); 
    698698        return false; 
    699699      } 
     
    705705  if (!try_3) 
    706706  { 
    707     RRLIB_LOG_MESSAGE(rrlib::logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> final check failed: could not load <%s> ... skipping\n", full_local_file_name.c_str()); 
     707    RRLIB_LOG_PRINTF(rrlib::logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> final check failed: could not load <%s> ... skipping\n", full_local_file_name.c_str()); 
    708708    return false; 
    709709  } 
Note: See TracChangeset for help on using the changeset viewer.