Changeset 61:f3ca80877de0 in rrlib_util


Ignore:
Timestamp:
20.07.2012 14:28:58 (7 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Children:
62:1c2de600a8dd, 63:ab4c2476f9ce
Phase:
public
Message:

Adapted to changes in rrlib_logging

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sFileIOUtils.cpp

    r52 r61  
    131131  if (system(sys_call.str().c_str()) == -1) 
    132132  { 
    133     RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils>> Error creating dir: '%s'\n", path.c_str()); 
     133    RRLIB_LOG_PRINTF(USER, "sFileIOUtils>> Error creating dir: '%s'\n", path.c_str()); 
    134134//     std::stringstream error_msg; 
    135135//     error_msg << "sFileIOUtils>> Error creating Dir:\n" 
     
    140140  else 
    141141  { 
    142 //     RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils>> Directory: '%s' successfully created.\n", path.c_str()); 
     142//     RRLIB_LOG_PRINTF(USER, "sFileIOUtils>> Directory: '%s' successfully created.\n", path.c_str()); 
    143143    return true; 
    144144  } 
     
    154154  if (fgets(buf, sizeof(buf), pipe) == 0) 
    155155  { 
    156     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::CreateTempfile() >> Error creating temp file!\n"); 
     156    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::CreateTempfile() >> Error creating temp file!\n"); 
    157157    exit(EXIT_FAILURE); 
    158158  } 
     
    182182  if (system(cmd.str().c_str()) != 0) 
    183183  { 
    184     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
     184    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
    185185    exit(EXIT_FAILURE); 
    186186  } 
     
    197197  if (system(cmd.str().c_str()) != 0) 
    198198  { 
    199     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
     199    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils>> Execution of command '%s' failed!\n", cmd.str().c_str()); 
    200200    exit(EXIT_FAILURE); 
    201201  } 
     
    238238      error_msg = "Unknown error"; 
    239239    } 
    240     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::%s >> Could not expand '%s': %s!\n", __FUNCTION__, file_name.c_str(), error_msg); 
     240    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::%s >> Could not expand '%s': %s!\n", __FUNCTION__, file_name.c_str(), error_msg); 
    241241    return false; 
    242242  } 
     
    295295std::string sFileIOUtils::GetHostName(bool fqdn) 
    296296{ 
    297   //RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::GetHostName() >>> started\n"); 
     297  //RRLIB_LOG_PRINTF(USER, "sFileIOUtils::GetHostName() >>> started\n"); 
    298298  std::string cmd = fqdn ? "hostname -f" : "hostname"; 
    299299  FILE * pipe = popen(cmd.c_str(), "r"); 
     
    301301  if (fgets(buf, sizeof(buf), pipe) == 0) 
    302302  { 
    303     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::GetHostName(bool fqdn) >> Error querying host name!\n"); 
     303    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::GetHostName(bool fqdn) >> Error querying host name!\n"); 
    304304    exit(EXIT_FAILURE); 
    305305  } 
     
    308308  sStringUtils::TrimWhitespace(name); 
    309309  //boost::trim(name); 
    310   //RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::GetHostName() >>> finished with name <%s>\n", name.c_str()); 
     310  //RRLIB_LOG_PRINTF(USER, "sFileIOUtils::GetHostName() >>> finished with name <%s>\n", name.c_str()); 
    311311  return name; 
    312312} // GetHostName() 
     
    323323  { 
    324324    address = * ((struct in_addr *) host_ent->h_addr_list[ 0 ]); 
    325     RRLIB_LOG_PRINTF(logging::eLL_USER, "ip address of host <%s> = <%s>\n", name.c_str(), inet_ntoa(address)); 
    326   } 
    327   else 
    328   { 
    329     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::GetIpAddressOfHost() >>> could not get ip address of host <%s>\n", name.c_str()); 
     325    RRLIB_LOG_PRINTF(USER, "ip address of host <%s> = <%s>\n", name.c_str(), inet_ntoa(address)); 
     326  } 
     327  else 
     328  { 
     329    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::GetIpAddressOfHost() >>> could not get ip address of host <%s>\n", name.c_str()); 
    330330  } 
    331331  return address; 
     
    338338struct in_addr sFileIOUtils::HostToIpViaNslookup(const std::string & name) 
    339339{ 
    340   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIpViaNslookup() >>> started with host <%s>\n", name.c_str()); 
     340  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaNslookup() >>> started with host <%s>\n", name.c_str()); 
    341341  struct in_addr address; 
    342342  address.s_addr = 0; 
     
    344344  std::stringstream command; 
    345345  command << "nslookup \"" << name << "\""; 
    346   RRLIB_LOG_PRINTF(logging::eLL_USER, "command = <%s>\n", command.str().c_str()); 
     346  RRLIB_LOG_PRINTF(USER, "command = <%s>\n", command.str().c_str()); 
    347347  FILE * pipe = popen(command.str().c_str(), "r"); 
    348348  if (!pipe) 
     
    358358  } 
    359359  pclose(pipe); 
    360   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIpViaNslookup() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
     360  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaNslookup() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
    361361 
    362362  std::string result_str(result.str()); 
     
    365365  if (pos == std::string::npos) 
    366366  { 
    367     RRLIB_LOG_PRINTF(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(ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
    368368    return address; 
    369369  } 
    370370  result_str.erase(0, pos + search_token.length()); 
    371   RRLIB_LOG_PRINTF(logging::eLL_USER, "pos = %zd\n", pos); 
     371  RRLIB_LOG_PRINTF(USER, "pos = %zd\n", pos); 
    372372 
    373373  search_token = "Address:"; 
     
    375375  if (pos == std::string::npos) 
    376376  { 
    377     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
     377    RRLIB_LOG_PRINTF(ERROR, "Could not find token <%s> in nslookup result ... returning <%s> \n", search_token.c_str(), inet_ntoa(address)); 
    378378    return address; 
    379379  } 
    380   RRLIB_LOG_PRINTF(logging::eLL_USER, "pos = %zd\n", pos); 
     380  RRLIB_LOG_PRINTF(USER, "pos = %zd\n", pos); 
    381381 
    382382  std::string found_name(result_str.substr(0, pos)); 
     
    387387  //boost::trim(ip); 
    388388 
    389   RRLIB_LOG_PRINTF(logging::eLL_USER, "found_name <%s> , name <%s> \n", found_name.c_str(), name.c_str()); 
     389  RRLIB_LOG_PRINTF(USER, "found_name <%s> , name <%s> \n", found_name.c_str(), name.c_str()); 
    390390 
    391391  if (found_name != name) 
    392392  { 
    393     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "nslookup failed .... returning <%s> \n", inet_ntoa(address)); 
     393    RRLIB_LOG_PRINTF(ERROR, "nslookup failed .... returning <%s> \n", inet_ntoa(address)); 
    394394    return address; 
    395395  } 
    396   RRLIB_LOG_PRINTF(logging::eLL_USER, "found_name <%s> , ip <%s> \n", found_name.c_str(), ip.c_str()); 
     396  RRLIB_LOG_PRINTF(USER, "found_name <%s> , ip <%s> \n", found_name.c_str(), ip.c_str()); 
    397397 
    398398  inet_aton(ip.c_str(), &address); 
     
    408408struct in_addr sFileIOUtils::HostToIpViaHost(const std::string & name) 
    409409{ 
    410   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIpViaHost() >>> started with host <%s>\n", name.c_str()); 
     410  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHost() >>> started with host <%s>\n", name.c_str()); 
    411411  struct in_addr address; 
    412412  address.s_addr = 0; 
     
    414414  std::stringstream command; 
    415415  command << "host -t A \"" << name << "\""; 
    416   RRLIB_LOG_PRINTF(logging::eLL_USER, "command = <%s>\n", command.str().c_str()); 
     416  RRLIB_LOG_PRINTF(USER, "command = <%s>\n", command.str().c_str()); 
    417417  FILE * pipe = popen(command.str().c_str(), "r"); 
    418418  if (!pipe) 
     
    428428  } 
    429429  pclose(pipe); 
    430   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIpViaHost() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
     430  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHost() >>> host = <%s> , result = <%s> \n", name.c_str(), result.str().c_str()); 
    431431 
    432432  std::string result_str(result.str()); 
     
    435435 
    436436  for_each(tokens.begin(), tokens.end(), sStringUtils::Trim<std::string>()); 
    437   RRLIB_LOG_PRINTF(logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHost() >>> got %d tokens:\n", tokens.size()); 
    438   RRLIB_LOG_PRINT(logging::eLL_DEBUG_VERBOSE_1, Join(tokens, "\n")); 
     437  RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHost() >>> got %d tokens:\n", tokens.size()); 
     438  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, Join(tokens, "\n")); 
    439439 
    440440  assert(tokens.size() == 4); 
    441   RRLIB_LOG_PRINTF(logging::eLL_USER, "found_name <%s> , ip <%s> \n", tokens[0].c_str(), tokens[3].c_str()); 
     441  RRLIB_LOG_PRINTF(USER, "found_name <%s> , ip <%s> \n", tokens[0].c_str(), tokens[3].c_str()); 
    442442 
    443443  inet_aton(tokens[3].c_str(), &address); 
     
    450450struct in_addr sFileIOUtils::HostToIpViaHostsFile(const std::string & name) 
    451451{ 
    452   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIpViaHostsFile() >>> started with host <%s>\n", name.c_str()); 
     452  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHostsFile() >>> started with host <%s>\n", name.c_str()); 
    453453  struct in_addr address; 
    454454  address.s_addr = 0; 
     
    476476          { 
    477477            ip_address = *iter; 
    478             RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIpViaHostsFile() >>> got ip <%s> of host <%s> from hosts file\n", ip_address.c_str(), name.c_str()); 
     478            RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIpViaHostsFile() >>> got ip <%s> of host <%s> from hosts file\n", ip_address.c_str(), name.c_str()); 
    479479            found = true; 
    480480            break; 
     
    494494struct in_addr sFileIOUtils::HostToIp(const std::string & name) 
    495495{ 
    496   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIp() >>> started with host <%s>\n", name.c_str()); 
     496  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> started with host <%s>\n", name.c_str()); 
    497497 
    498498  struct in_addr address; 
     
    501501  if ((address = sFileIOUtils::HostToIpViaHostsFile(name)).s_addr != 0) 
    502502  { 
    503     RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> from hosts_file\n", inet_ntoa(address), name.c_str()); 
     503    RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> from hosts_file\n", inet_ntoa(address), name.c_str()); 
    504504  } 
    505505  else if ((address = sFileIOUtils::HostToIpViaHost(name)).s_addr != 0) 
    506506  { 
    507     RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <host -t A>\n", inet_ntoa(address), name.c_str()); 
     507    RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <host -t A>\n", inet_ntoa(address), name.c_str()); 
    508508  } 
    509509  else if ((address = sFileIOUtils::HostToIpViaNslookup(name)).s_addr != 0) 
    510510  { 
    511     RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <nslookup>\n", inet_ntoa(address), name.c_str()); 
    512   } 
    513   else 
    514   { 
    515     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::HostToIp() >>> could not get ip of host <%s>\n", name.c_str()); 
     511    RRLIB_LOG_PRINTF(USER, "sFileIOUtils::HostToIp() >>> got ip <%s> of host <%s> via <nslookup>\n", inet_ntoa(address), name.c_str()); 
     512  } 
     513  else 
     514  { 
     515    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::HostToIp() >>> could not get ip of host <%s>\n", name.c_str()); 
    516516  } 
    517517 
     
    541541                << target_directory; 
    542542 
    543   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::RSyncFile() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
     543  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFile() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
    544544  int ret = system(rsync_command.str().c_str()); 
    545   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::RSyncFile() >>> ... done.\n"); 
    546  
    547   RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::RSyncFile() >>> finished with result %d\n", ret); 
     545  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFile() >>> ... done.\n"); 
     546 
     547  RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::RSyncFile() >>> finished with result %d\n", ret); 
    548548  return ret; 
    549549} // RSyncFile() 
     
    576576                << target_directory; 
    577577 
    578   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::RSyncFiles() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
     578  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFiles() >>> executing <%s> ...\n", rsync_command.str().c_str()); 
    579579  int ret = system(rsync_command.str().c_str()); 
    580   RRLIB_LOG_PRINTF(logging::eLL_USER, "sFileIOUtils::RSyncFiles() >>> ... done.\n"); 
    581  
    582   RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::RSyncFiles() >>> finished with result %d\n", ret); 
     580  RRLIB_LOG_PRINTF(USER, "sFileIOUtils::RSyncFiles() >>> ... done.\n"); 
     581 
     582  RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::RSyncFiles() >>> finished with result %d\n", ret); 
    583583  return ret; 
    584584} // RSyncFiles() 
     
    590590bool 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) 
    591591{ 
    592   RRLIB_LOG_PRINTF(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()); 
     592  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()); 
    593593 
    594594  //!##################################################################################################### 
     
    611611  full_local_file_name = "./" + resource_repository + file_name; 
    612612 
    613   RRLIB_LOG_PRINTF(logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 1. check: trying to load <%s>\n", full_local_file_name.c_str()); 
     613  RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 1. check: trying to load <%s>\n", full_local_file_name.c_str()); 
    614614  ifstream try_1(full_local_file_name.c_str()); 
    615615  if (try_1) 
     
    629629    if (!sFileIOUtils::ShellExpandFilename(expanded_local_resource_directory, local_resource_directory + "/")) 
    630630    { 
    631       RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::%s >> Could not expand local resource directory!\n", __FUNCTION__); 
     631      RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::%s >> Could not expand local resource directory!\n", __FUNCTION__); 
    632632      return false; 
    633633    } 
    634634    full_local_file_name = (expanded_local_resource_directory + resource_repository + file_name); 
    635635 
    636     RRLIB_LOG_PRINTF(logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 2. check: trying to load <%s>\n", full_local_file_name.c_str()); 
     636    RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> 2. check: trying to load <%s>\n", full_local_file_name.c_str()); 
    637637    ifstream try_2(full_local_file_name.c_str()); 
    638638    if (try_2) 
     
    652652      { 
    653653        local_host = sFileIOUtils::cached_local_host; 
    654         RRLIB_LOG_PRINTF(logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved local_host <%s> from cache\n", local_host.c_str()); 
     654        RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> retrieved local_host <%s> from cache\n", local_host.c_str()); 
    655655      } 
    656656      else 
     
    669669        { 
    670670          server_ip_address = pos->second; 
    671           RRLIB_LOG_PRINTF(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()); 
     671          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()); 
    672672        } 
    673673        else 
    674674        { 
    675675          server_ip_address = inet_ntoa(sFileIOUtils::HostToIp(server)); 
    676           RRLIB_LOG_PRINTF(logging::eLL_DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> got ip address <%s> of host <%s>\n", server_ip_address.c_str(), server.c_str()); 
     676          RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::CheckAndGetFile() >>> got ip address <%s> of host <%s>\n", server_ip_address.c_str(), server.c_str()); 
    677677 
    678678          if (server_ip_address == "0.0.0.0") 
    679679          { 
    680             RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::constructor >>> zero ip address ... clearing server\n"); 
     680            RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::constructor >>> zero ip address ... clearing server\n"); 
    681681            server = ""; 
    682682          } 
     
    691691      if (server != "")   //&& server != local_host) 
    692692      { 
    693         RRLIB_LOG_PRINTF(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()); 
     693        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()); 
    694694 
    695695        // rsync from <resource_server:server_resource_directory + resource_repository> 
     
    698698        if (sFileIOUtils::RSyncFile("", server_ip_address, server_resource_directory + "/./" + resource_repository, file_name, expanded_local_resource_directory, "R") != 0) 
    699699        { 
    700           RRLIB_LOG_PRINTF(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()); 
     700          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()); 
    701701          return false; 
    702702        } 
     
    705705      else 
    706706      { 
    707         RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> could neither load <%s> locally nor from resource server ... skipping\n", file_name.c_str()); 
     707        RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::CheckAndGetFile() >>> could neither load <%s> locally nor from resource server ... skipping\n", file_name.c_str()); 
    708708        return false; 
    709709      } 
     
    715715  if (!try_3) 
    716716  { 
    717     RRLIB_LOG_PRINTF(logging::eLL_ERROR, "sFileIOUtils::CheckAndGetFile() >>> final check failed: could not load <%s> ... skipping\n", full_local_file_name.c_str()); 
     717    RRLIB_LOG_PRINTF(ERROR, "sFileIOUtils::CheckAndGetFile() >>> final check failed: could not load <%s> ... skipping\n", full_local_file_name.c_str()); 
    718718    return false; 
    719719  } 
  • sFileIOUtils.h

    r53 r61  
    134134  { 
    135135    std::ofstream output_file_stream; 
    136     RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG_VERBOSE_1, "got file <", filename, ">"); 
     136    RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "got file <", filename, ">"); 
    137137    if (sStringUtils::EndsWith(filename, ".bz2")) 
    138138    { 
    139       RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG_VERBOSE_1, "compressing"); 
     139      RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "compressing"); 
    140140      boost::iostreams::filtering_ostream out; 
    141141      out.push(boost::iostreams::bzip2_compressor()); 
    142142      output_file_stream.open(filename.c_str()); 
    143       if ( output_file_stream ) 
     143      if (output_file_stream) 
    144144      { 
    145145        out.push(output_file_stream); 
     
    151151    { 
    152152      output_file_stream.open(filename.c_str()); 
    153       if ( output_file_stream ) 
     153      if (output_file_stream) 
    154154      { 
    155155        std::copy(content.begin(), content.end(), std::ostream_iterator<T>(output_file_stream)); 
     
    172172  { 
    173173    std::ifstream input_file_stream; 
    174     RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG_VERBOSE_1, "got file <", filename, ">"); 
     174    RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "got file <", filename, ">"); 
    175175    if (sStringUtils::EndsWith(filename, ".bz2")) 
    176176    { 
    177       RRLIB_LOG_PRINT(rrlib::logging::eLL_DEBUG_VERBOSE_1, "decompressing"); 
     177      RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, "decompressing"); 
    178178      boost::iostreams::filtering_istream in; 
    179179      in.push(boost::iostreams::bzip2_decompressor()); 
Note: See TracChangeset for help on using the changeset viewer.