Changeset 136:53211ebe7c86 in rrlib_util


Ignore:
Timestamp:
11.06.2015 15:07:32 (4 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Parents:
130:9777943e41e5 (diff), 134:fb5983113932 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge with 13.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sFileIOUtils.cpp

    r131 r136  
    5656//---------------------------------------------------------------------- 
    5757#include <cassert> 
     58#include <cstring> 
     59#include <cerrno> 
    5860 
    5961//---------------------------------------------------------------------- 
     
    132134  if (system(sys_call.str().c_str()) == -1) 
    133135  { 
    134     RRLIB_LOG_PRINTF(USER, "sFileIOUtils>> Error creating dir: '%s'\n", path.c_str()); 
     136    RRLIB_LOG_PRINT(USER, "sFileIOUtils>> Error creating dir: '", path, "'"); 
    135137//     std::stringstream error_msg; 
    136138//     error_msg << "sFileIOUtils>> Error creating Dir:\n" 
     
    141143  else 
    142144  { 
    143 //     RRLIB_LOG_PRINTF(USER, "sFileIOUtils>> Directory: '%s' successfully created.\n", path.c_str()); 
     145//     RRLIB_LOG_PRINT(USER, "Directory: '", path, "' successfully created."); 
    144146    return true; 
    145147  } 
     
    155157  if (fgets(buf, sizeof(buf), pipe) == 0) 
    156158  { 
    157     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::CreateTempfile() >> Error creating temp file!\n"); 
     159    RRLIB_LOG_PRINT(ERROR, "Error creating temp file!"); 
    158160    exit(EXIT_FAILURE); 
    159161  } 
     
    183185  if (system(cmd.str().c_str()) != 0) 
    184186  { 
    185     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
     187    RRLIB_LOG_PRINT(ERROR, "Execution of command '", cmd.str(), "' failed!"); 
    186188    exit(EXIT_FAILURE); 
    187189  } 
     
    198200  if (system(cmd.str().c_str()) != 0) 
    199201  { 
    200     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
     202    RRLIB_LOG_PRINT(ERROR, "Execution of command '", cmd.str(), "' failed!"); 
    201203    exit(EXIT_FAILURE); 
    202204  } 
     
    223225 
    224226  return true; 
    225 } 
     227} // FileExists() 
     228 
     229 
     230//---------------------------------------------------------------------- 
     231// class sFileIOUtils::CountLineNumbers() 
     232//---------------------------------------------------------------------- 
     233size_t sFileIOUtils::CountLineNumbers(const std::string &filename) 
     234{ 
     235  std::ifstream file(filename); 
     236  return std::count(std::istreambuf_iterator<char>(file), 
     237                    std::istreambuf_iterator<char>(), '\n'); 
     238} // CountLineNumbers() 
     239 
    226240 
    227241 
     
    233247  return ShellExpandFilename(file_name, file_name); 
    234248} // ShellExpandFilename() 
     249 
     250//---------------------------------------------------------------------- 
     251// class sFileIOUtils::ShellExpandFilename() 
     252//---------------------------------------------------------------------- 
     253std::string sFileIOUtils::ShellExpandFilename(const std::string &file_name) 
     254{ 
     255  std::string result(""); 
     256  if (ShellExpandFilename(result, file_name)) 
     257    return result; 
     258  else 
     259    return ""; 
     260} // ShellExpandFilename() 
     261 
    235262 
    236263//---------------------------------------------------------------------- 
     
    262289      error_msg = "Unknown error"; 
    263290    } 
    264     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::%s >> Could not expand '%s': %s!\n", __FUNCTION__, file_name.c_str(), error_msg); 
     291    RRLIB_LOG_PRINT(ERROR, "Could not expand '", file_name, "': ", error_msg, "!"); 
    265292    return false; 
    266293  } 
     
    313340 
    314341 
    315  
    316342//---------------------------------------------------------------------- 
    317343// class sFileIOUtils::GetHostName() 
    318344//---------------------------------------------------------------------- 
    319 std::string sFileIOUtils::GetHostName(bool fqdn) 
    320 { 
    321   //RRLIB_LOG_PRINTF(USER, "sFileIOUtils::GetHostName() >>> started\n"); 
    322   std::string cmd = fqdn ? "hostname -f" : "hostname"; 
    323   FILE * pipe = popen(cmd.c_str(), "r"); 
    324   char buf[ 1024 ]; 
    325   if (fgets(buf, sizeof(buf), pipe) == 0) 
    326   { 
    327     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::GetHostName(bool fqdn) >> Error querying host name!\n"); 
     345std::string sFileIOUtils::GetHostName() 
     346{ 
     347  char name[1024]; 
     348  int result = gethostname(name, 1024); 
     349  if (result) 
     350  { 
     351    RRLIB_LOG_PRINT(ERROR, "got error: <", strerror(errno), ">"); 
    328352    exit(EXIT_FAILURE); 
    329353  } 
    330   pclose(pipe); 
    331   std::string name(buf); 
    332   sStringUtils::TrimWhitespace(name); 
    333   //boost::trim(name); 
    334   //RRLIB_LOG_PRINTF(USER, "sFileIOUtils::GetHostName() >>> finished with name <%s>\n", name.c_str()); 
     354  RRLIB_LOG_PRINT(DEBUG, "got hostname: <", name, ">"); 
     355 
    335356  return name; 
    336357} // GetHostName() 
     
    347368  { 
    348369    address = * ((struct in_addr *) host_ent->h_addr_list[ 0 ]); 
    349     RRLIB_LOG_PRINTF(USER, "ip address of host <%s> = <%s>\n", name.c_str(), inet_ntoa(address)); 
    350   } 
    351   else 
    352   { 
    353     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::GetIpAddressOfHost() >>> could not get ip address of host <%s>\n", name.c_str()); 
     370    RRLIB_LOG_PRINT(USER, "ip address of host <", name, "> = <", inet_ntoa(address), ">"); 
     371  } 
     372  else 
     373  { 
     374    RRLIB_LOG_PRINT(ERROR, "could not get ip address of host <", name, ">"); 
    354375  } 
    355376  return address; 
     
    362383struct in_addr sFileIOUtils::HostToIpViaNslookup(const std::string & name) 
    363384{ 
    364   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaNslookup() >>> started with host <%s>\n", name.c_str()); 
     385  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "started with host <", name, ">"); 
    365386  struct in_addr address; 
    366387  address.s_addr = 0; 
     
    368389  std::stringstream command; 
    369390  command << "nslookup \"" << name << "\""; 
    370   RRLIB_LOG_PRINTF(USER, "command = <%s>\n", command.str().c_str()); 
     391  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "command = <", command, ">"); 
    371392  FILE * pipe = popen(command.str().c_str(), "r"); 
    372393  if (!pipe) 
     
    382403  } 
    383404  pclose(pipe); 
    384   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaNslookup() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
     405  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "host = <", name, ">, result = <", result.str(), ">"); 
    385406 
    386407  std::string result_str(result.str()); 
     
    389410  if (pos == std::string::npos) 
    390411  { 
    391     RRLIB_LOG_PRINTF(ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
     412    RRLIB_LOG_PRINT(ERROR, "Could not find token <", search_token, "> in nslookup result ... returning <", inet_ntoa(address), ">"); 
    392413    return address; 
    393414  } 
    394415  result_str.erase(0, pos + search_token.length()); 
    395   RRLIB_LOG_PRINTF(USER, "pos = %zd\n", pos); 
     416  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "pos = ", pos); 
    396417 
    397418  search_token = "Address:"; 
     
    399420  if (pos == std::string::npos) 
    400421  { 
    401     RRLIB_LOG_PRINTF(ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
     422    RRLIB_LOG_PRINT(ERROR, "Could not find token <", search_token, "> in nslookup result ... returning <", inet_ntoa(address), ">"); 
    402423    return address; 
    403424  } 
    404   RRLIB_LOG_PRINTF(USER, "pos = %zd\n", pos); 
     425  RRLIB_LOG_PRINT(USER, "pos = ", pos); 
    405426 
    406427  std::string found_name(result_str.substr(0, pos)); 
    407428  sStringUtils::TrimWhitespace(found_name); 
    408   //boost::trim(found_name); 
    409429  std::string ip(result_str.substr(pos + search_token.length())); 
    410430  sStringUtils::TrimWhitespace(ip); 
    411   //boost::trim(ip); 
    412  
    413   RRLIB_LOG_PRINTF(USER, "found_name <%s> , name <%s> \n", found_name.c_str(), name.c_str()); 
     431 
     432  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "found_name <", found_name, "> , name <", name, ">"); 
    414433 
    415434  if (found_name != name) 
    416435  { 
    417     RRLIB_LOG_PRINTF(ERROR, "nslookup failed .... returning <%s> \n", inet_ntoa(address)); 
     436    RRLIB_LOG_PRINT(ERROR, "nslookup failed .... returning <", inet_ntoa(address), ">"); 
    418437    return address; 
    419438  } 
    420   RRLIB_LOG_PRINTF(USER, "found_name <%s> , ip <%s> \n", found_name.c_str(), ip.c_str()); 
     439  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "found_name <", found_name, "> , ip <", ip, ">"); 
    421440 
    422441  inet_aton(ip.c_str(), &address); 
    423442 
    424   //return ip.c_str(); 
    425443  return address; 
    426444} // HostToIpViaNslookup() 
     
    432450struct in_addr sFileIOUtils::HostToIpViaHost(const std::string & name) 
    433451{ 
    434   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHost() >>> started with host <%s>\n", name.c_str()); 
     452  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "started with host <", name, ">"); 
    435453  struct in_addr address; 
    436454  address.s_addr = 0; 
     
    438456  std::stringstream command; 
    439457  command << "host -t A \"" << name << "\""; 
    440   RRLIB_LOG_PRINTF(USER, "command = <%s>\n", command.str().c_str()); 
     458  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "command = <", command.str(), ">"); 
    441459  FILE * pipe = popen(command.str().c_str(), "r"); 
    442460  if (!pipe) 
     
    452470  } 
    453471  pclose(pipe); 
    454   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHost() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
    455  
    456   std::string result_str(result.str()); 
    457   std::vector<std::string> tokens; 
    458   sStringUtils::Tokenize(result_str, tokens, " \t"); 
    459  
    460   for_each(tokens.begin(), tokens.end(), sStringUtils::Trim<std::string>()); 
    461   RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHost() >>> got %d tokens:\n", tokens.size()); 
    462   RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, Join(tokens, "\n")); 
    463  
    464   if (tokens.size() == 4) 
    465   { 
    466     RRLIB_LOG_PRINTF(USER, "found_name <%s> , ip <%s> \n", tokens[0].c_str(), tokens[3].c_str()); 
    467     inet_aton(tokens[3].c_str(), &address); 
    468   } 
     472  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "host = <", name, "> , result = <", result.str(), ">"); 
     473 
     474  string result_str(result.str()); 
     475  string search("has address"); 
     476  size_t pos = result_str.find(search); 
     477  if (pos == string::npos) 
     478  { 
     479    RRLIB_LOG_PRINT(ERROR, "could not find address token in host call"); 
     480    return address; 
     481  } 
     482  string address_str(result_str.substr(pos + search.size(), result_str.size())); 
     483  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "token = <", address_str, ">"); 
     484  sStringUtils::TrimWhitespace(address_str); 
     485  if (inet_aton(address_str.c_str(), &address) == 0) 
     486    RRLIB_LOG_PRINT(ERROR, "could not resolve address <", address_str, ">"); 
     487  else 
     488    RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "address = <", inet_ntoa(address), ">"); 
    469489  return address; 
    470490} // HostToIpViaHost() 
     
    475495struct in_addr sFileIOUtils::HostToIpViaHostsFile(const std::string & name) 
    476496{ 
    477   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHostsFile() >>> started with host <%s>\n", name.c_str()); 
     497  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "started with host <", name, ">"); 
    478498  struct in_addr address; 
    479499  address.s_addr = 0; 
     
    501521          { 
    502522            ip_address = *iter; 
    503             RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHostsFile() >>> got ip <%s> of host <%s> from hosts file\n", ip_address.c_str(), name.c_str()); 
     523            RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHostsFile() >>> got ip <", ip_address, "> of host <", name, "> from hosts file"); 
    504524            found = true; 
    505525            break; 
     
    519539struct in_addr sFileIOUtils::HostToIp(const std::string & name) 
    520540{ 
    521   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> started with host <%s>\n", name.c_str()); 
     541  RRLIB_LOG_PRINT(USER, "started with host <", name, ">"); 
    522542 
    523543  struct in_addr address; 
     
    526546  if ((address = sFileIOUtils::HostToIpViaHostsFile(name)).s_addr != 0) 
    527547  { 
    528     RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> from hosts_file\n", inet_ntoa(address), name.c_str()); 
     548    RRLIB_LOG_PRINT(USER, "got ip <", inet_ntoa(address), "> of host <", name, "> from hosts_file"); 
    529549  } 
    530550  else if ((address = sFileIOUtils::HostToIpViaHost(name)).s_addr != 0) 
    531551  { 
    532     RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <host -t A>\n", inet_ntoa(address), name.c_str()); 
     552    RRLIB_LOG_PRINT(USER, "got ip <", inet_ntoa(address), "> of host <", name, "> via <host -t A>"); 
    533553  } 
    534554  else if ((address = sFileIOUtils::HostToIpViaNslookup(name)).s_addr != 0) 
    535555  { 
    536     RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <nslookup>\n", inet_ntoa(address), name.c_str()); 
    537   } 
    538   else 
    539   { 
    540     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::HostToIp() >>> could not get ip of host <%s>\n", name.c_str()); 
     556    RRLIB_LOG_PRINT(USER, "got ip <", inet_ntoa(address), "> of host <", name, "> via <nslookup>"); 
     557  } 
     558  else 
     559  { 
     560    RRLIB_LOG_PRINT(ERROR, "could not get ip of host <", name, ">"); 
    541561  } 
    542562 
     
    566586                << target_directory; 
    567587 
    568   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFile() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
     588  RRLIB_LOG_PRINT(USER, "executing <", rsync_command.str(), "> ..."); 
    569589  int ret = system(rsync_command.str().c_str()); 
    570   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFile() >>> ... done.\n"); 
    571  
    572   RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::RSyncFile() >>> finished with result %d\n", ret); 
     590  RRLIB_LOG_PRINT(USER, " ... done.\n"); 
     591 
     592  RRLIB_LOG_PRINT(ERROR, "finished with result ", ret); 
    573593  return ret; 
    574594} // RSyncFile() 
     
    601621                << target_directory; 
    602622 
    603   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFiles() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
     623  RRLIB_LOG_PRINT(USER, "executing <", rsync_command.str(), "> ..."); 
    604624  int ret = system(rsync_command.str().c_str()); 
    605   RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFiles() >>> ... done.\n"); 
    606  
    607   RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::RSyncFiles() >>> finished with result %d\n", ret); 
     625  RRLIB_LOG_PRINT(USER, "... done.\n"); 
     626 
     627  RRLIB_LOG_PRINT(ERROR, "finished with result ", ret); 
    608628  return ret; 
    609629} // RSyncFiles() 
     
    615635bool 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) 
    616636{ 
    617   RRLIB_LOG_PRINTF(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()); 
     637  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "started with local_resource_directory <", local_resource_directory, ">, resource_repository <", resource_repository, ">, file_name <", file_name, ">, resource_server <", resource_server, ">, server_resource_directory <", server_resource_directory, ">"); 
    618638 
    619639  //!##################################################################################################### 
     
    636656  full_local_file_name = "./" + resource_repository + file_name; 
    637657 
    638   RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 1. check: trying to load <%s>\n", full_local_file_name.c_str()); 
     658  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "1. check: trying to load <", full_local_file_name, ">"); 
    639659  ifstream try_1(full_local_file_name.c_str()); 
    640660  if (try_1) 
     
    654674    if (!sFileIOUtils::ShellExpandFilename(expanded_local_resource_directory, local_resource_directory + "/")) 
    655675    { 
    656       RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::%s >> Could not expand local resource directory!\n", __FUNCTION__); 
     676      RRLIB_LOG_PRINT(ERROR, "Could not expand local resource directory!"); 
    657677      return false; 
    658678    } 
    659679    full_local_file_name = (expanded_local_resource_directory + resource_repository + file_name); 
    660680 
    661     RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 2. check: trying to load <%s>\n", full_local_file_name.c_str()); 
     681    RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "2. check: trying to load <", full_local_file_name, ">"); 
    662682    ifstream try_2(full_local_file_name.c_str()); 
    663683    if (try_2) 
     
    677697      { 
    678698        local_host = sFileIOUtils::cached_local_host; 
    679         RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved local_host <%s> from cache\n", local_host.c_str()); 
     699        RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "retrieved local_host <", local_host, "> from cache"); 
    680700      } 
    681701      else 
     
    694714        { 
    695715          server_ip_address = pos->second; 
    696           RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved ip address <%s> of host <%s> from cache\n", server_ip_address.c_str(), server.c_str()); 
     716          RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "retrieved ip address <", server_ip_address, "> of host <", server, "> from cache"); 
    697717        } 
    698718        else 
    699719        { 
    700720          server_ip_address = inet_ntoa(sFileIOUtils::HostToIp(server)); 
    701           RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> got ip address <%s> of host <%s>\n", server_ip_address.c_str(), server.c_str()); 
     721          RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "got ip address <", server_ip_address, "> of host <", server, ">"); 
    702722 
    703723          if (server_ip_address == "0.0.0.0") 
    704724          { 
    705             RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::constructor >>> zero ip address ... clearing server\n"); 
     725            RRLIB_LOG_PRINT(ERROR, "zero ip address ... clearing server"); 
    706726            server = ""; 
    707727          } 
     
    716736      if (server != "")   //&& server != local_host) 
    717737      { 
    718         RRLIB_LOG_PRINTF(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()); 
     738        RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "3. check: trying to rsync <", server_ip_address, ":", server_resource_directory + resource_repository + file_name, "> to <", expanded_local_resource_directory, ">"); 
    719739 
    720740        // rsync from <resource_server:server_resource_directory + resource_repository> 
     
    723743        if (sFileIOUtils::RSyncFile("", server_ip_address, server_resource_directory + "/./" + resource_repository, file_name, expanded_local_resource_directory, "R") != 0) 
    724744        { 
    725           RRLIB_LOG_PRINTF(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()); 
     745          RRLIB_LOG_PRINT(ERROR, "could not rsync file <", file_name, "> from server <", server, "> at <", server_resource_directory + resource_repository, "> ... skipping"); 
    726746          return false; 
    727747        } 
     
    730750      else 
    731751      { 
    732         RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::CheckAndGetFile() >>> could neither load <%s> locally nor from resource server ... skipping\n", file_name.c_str()); 
     752        RRLIB_LOG_PRINT(ERROR, "could neither load <", file_name, "> locally nor from resource server ... skipping"); 
    733753        return false; 
    734754      } 
     
    740760  if (!try_3) 
    741761  { 
    742     RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::CheckAndGetFile() >>> final check failed: could not load <%s> ... skipping\n", full_local_file_name.c_str()); 
     762    RRLIB_LOG_PRINT(ERROR, "final check failed: could not load <", full_local_file_name, "> ... skipping"); 
    743763    return false; 
    744764  } 
Note: See TracChangeset for help on using the changeset viewer.