Ignore:
Timestamp:
03/08/2007 00:29:31 (5 years ago)
Author:
chris
Message:

Convert most printf() and fprintf() calls to use logging framework
instead. (merges [1789])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/chris/general/lib/backupstore/BackupStoreCheck2.cpp

    r1149 r1790  
    4848        else 
    4949        { 
    50                 ::printf("Root directory doesn't exist\n"); 
     50                BOX_WARNING("Root directory doesn't exist"); 
    5151                 
    5252                ++mNumberErrorsFound; 
     
    119119                        { 
    120120                                // Unattached object... 
    121                                 ::printf("Object %llx is unattached.\n", pblock->mID[e]); 
     121                                BOX_WARNING("Object " << BOX_FORMAT_OBJECTID(pblock->mID[e]) << " is unattached."); 
    122122                                ++mNumberErrorsFound; 
    123123 
     
    148148                                                if(diffFromObjectID != 0) 
    149149                                                { 
    150                                                         ::printf("Object %llx is unattached, and is a patch. Deleting, cannot reliably recover.\n", pblock->mID[e]); 
     150                                                        BOX_WARNING("Object " << BOX_FORMAT_OBJECTID(pblock->mID[e]) << " is unattached, and is a patch. Deleting, cannot reliably recover."); 
    151151                                                 
    152152                                                        // Delete this object instead 
     
    230230        if(!mFixErrors) 
    231231        { 
    232                 ::printf("Missing directory %llx could be recreated\n", MissingDirectoryID); 
     232                BOX_WARNING("Missing directory " <<  
     233                        BOX_FORMAT_OBJECTID(MissingDirectoryID) << 
     234                        " could be recreated."); 
    233235                mDirsAdded.insert(MissingDirectoryID); 
    234236                return true; 
    235237        } 
    236         ::printf("Recreating missing directory %llx\n", MissingDirectoryID); 
     238 
     239        BOX_WARNING("Recreating missing directory " <<  
     240                BOX_FORMAT_OBJECTID(MissingDirectoryID)); 
    237241         
    238242        // Create a blank directory 
     
    301305                { 
    302306                        // Found a name which can be used 
    303                         ::printf("Lost and found dir has name %s\n", name); 
     307                        BOX_WARNING("Lost and found dir has name " << name); 
    304308                        break; 
    305309                } 
     
    525529        catch(...) 
    526530        { 
    527                 ::printf("Load of existing store info failed, regenerating.\n"); 
     531                BOX_WARNING("Load of existing store info failed, regenerating."); 
    528532                ++mNumberErrorsFound; 
    529533        } 
     
    552556        else 
    553557        { 
    554                 ::printf("NOTE: Soft limit for account changed to ensure housekeeping doesn't delete files on next run\n"); 
     558                BOX_WARNING("Soft limit for account changed to ensure housekeeping doesn't delete files on next run."); 
    555559        } 
    556560        if(poldInfo.get() != 0 && poldInfo->GetBlocksHardLimit() > minHard) 
     
    560564        else 
    561565        { 
    562                 ::printf("NOTE: Hard limit for account changed to ensure housekeeping doesn't delete files on next run\n"); 
     566                BOX_WARNING("Hard limit for account changed to ensure housekeeping doesn't delete files on next run."); 
    563567        } 
    564568         
     
    587591        { 
    588592                info->Save(); 
    589                 ::printf("New store info file written successfully.\n"); 
     593                BOX_NOTICE("New store info file written successfully."); 
    590594        } 
    591595} 
Note: See TracChangeset for help on using the changeset viewer.