Ignore:
Timestamp:
01/08/2007 00:18:50 (5 years ago)
Author:
chris
Message:

Replace almost all calls to syslog() with logging framework. (merges [1783])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/chris/general/bin/bbackupctl/bbackupctl.cpp

    r1690 r1784  
    163163 
    164164#if defined WIN32 && ! defined NDEBUG 
    165                 syslog(LOG_ERR,"Failed to connect to the command socket"); 
     165                BOX_ERROR("Failed to connect to the command socket"); 
    166166#endif 
    167167 
     
    176176        if(!getLine.GetLine(configSummary)) 
    177177        { 
    178 #if defined WIN32 && ! defined NDEBUG 
    179                 syslog(LOG_ERR, "Failed to receive configuration summary " 
     178                BOX_ERROR("Failed to receive configuration summary " 
    180179                        "from daemon"); 
    181 #else 
    182                 printf("Failed to receive configuration summary from daemon\n"); 
    183 #endif 
    184  
    185180                return 1; 
    186181        } 
     
    189184        if(getLine.IsEOF()) 
    190185        { 
    191 #if defined WIN32 && ! defined NDEBUG 
    192                 syslog(LOG_ERR, "Server rejected the connection. " 
    193                         "Are you running bbackupctl as the same user " 
    194                         "as the daemon?"); 
    195 #else 
    196                 printf("Server rejected the connection. " 
    197                         "Are you running bbackupctl as the same user " 
    198                         "as the daemon?\n"); 
    199 #endif 
    200  
     186                BOX_ERROR("Server rejected the connection. Are you running " 
     187                        "bbackupctl as the same user as the daemon?"); 
    201188                return 1; 
    202189        } 
     
    225212        if(!getLine.GetLine(stateLine) || getLine.IsEOF()) 
    226213        { 
    227 #if defined WIN32 && ! defined NDEBUG 
    228                 syslog(LOG_ERR, "Failed to receive state line from daemon"); 
    229 #else 
    230                 printf("Failed to receive state line from daemon\n"); 
    231 #endif 
     214                BOX_ERROR("Failed to receive state line from daemon"); 
    232215                return 1; 
    233216        } 
     
    237220        if(::sscanf(stateLine.c_str(), "state %d", &currentState) != 1) 
    238221        { 
    239                 printf("State line didn't decode\n"); 
     222                BOX_ERROR("Received invalid state line from daemon"); 
    240223                return 1; 
    241224        } 
     
    267250                        if(!autoBackup) 
    268251                        { 
    269                                 printf("ERROR: Daemon is not in automatic mode -- " 
    270                                         "sync will never start!\n"); 
     252                                BOX_ERROR("Daemon is not in automatic mode, " 
     253                                        "sync will never start!"); 
    271254                                return 1; 
    272255                        } 
Note: See TracChangeset for help on using the changeset viewer.