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/bbackupd/BackupClientContext.cpp

    r1659 r1784  
    1010#include "Box.h" 
    1111 
    12 #ifdef HAVE_SYSLOG_H 
    13         #include <syslog.h> 
    14 #endif 
    1512#ifdef HAVE_SIGNAL_H 
    1613        #include <signal.h> 
    1714#endif 
     15 
    1816#ifdef HAVE_SYS_TIME_H 
    1917        #include <sys/time.h> 
     
    128126                 
    129127                // Log intention 
    130                 ::syslog(LOG_INFO, "Opening connection to server %s...", mHostname.c_str()); 
     128                BOX_INFO("Opening connection to server '" << 
     129                        mHostname << "'..."); 
    131130 
    132131                // Connect! 
     
    148147                        if (!mpExtendedLogFileHandle) 
    149148                        { 
    150                                 ::syslog(LOG_ERR, "Failed to open extended " 
    151                                         "log file: %s", strerror(errno)); 
     149                                BOX_ERROR("Failed to open extended log " 
     150                                        "file: " << strerror(errno)); 
    152151                        } 
    153152                        else 
     
    195194                 
    196195                // Log success 
    197                 ::syslog(LOG_INFO, "Connection made, login successful"); 
     196                BOX_INFO("Connection made, login successful"); 
    198197 
    199198                // Check to see if there is any space available on the server 
     
    203202                        mStorageLimitExceeded = true; 
    204203                        // Log 
    205                         ::syslog(LOG_WARNING, "Exceeded storage hard-limit on server -- not uploading changes to files"); 
     204                        BOX_WARNING("Exceeded storage hard-limit on server, " 
     205                                "not uploading changes to files"); 
    206206                } 
    207207        } 
Note: See TracChangeset for help on using the changeset viewer.