summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupClientContext.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-07-31 23:18:05 +0000
committerChris Wilson <chris+github@qwirx.com>2007-07-31 23:18:05 +0000
commit0b2fd98dd63c533e00c0d61ce022f37ee75857cc (patch)
tree5daa2a50b28b572e01281b622fee3adf818f5075 /bin/bbackupd/BackupClientContext.cpp
parent05db569d4efc62eaa10597142b8eac4937421e14 (diff)
Replace almost all calls to syslog() with logging framework. (refs #3)
Diffstat (limited to 'bin/bbackupd/BackupClientContext.cpp')
-rw-r--r--bin/bbackupd/BackupClientContext.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp
index 18859393..4b4efd90 100644
--- a/bin/bbackupd/BackupClientContext.cpp
+++ b/bin/bbackupd/BackupClientContext.cpp
@@ -9,12 +9,10 @@
#include "Box.h"
-#ifdef HAVE_SYSLOG_H
- #include <syslog.h>
-#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
+
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -127,7 +125,8 @@ BackupProtocolClient &BackupClientContext::GetConnection()
}
// Log intention
- ::syslog(LOG_INFO, "Opening connection to server %s...", mHostname.c_str());
+ BOX_INFO("Opening connection to server '" <<
+ mHostname << "'...");
// Connect!
mpSocket->Open(mrTLSContext, Socket::TypeINET, mHostname.c_str(), BOX_PORT_BBSTORED);
@@ -147,8 +146,8 @@ BackupProtocolClient &BackupClientContext::GetConnection()
if (!mpExtendedLogFileHandle)
{
- ::syslog(LOG_ERR, "Failed to open extended "
- "log file: %s", strerror(errno));
+ BOX_ERROR("Failed to open extended log "
+ "file: " << strerror(errno));
}
else
{
@@ -194,7 +193,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
}
// Log success
- ::syslog(LOG_INFO, "Connection made, login successful");
+ BOX_INFO("Connection made, login successful");
// Check to see if there is any space available on the server
if(loginConf->GetBlocksUsed() >= loginConf->GetBlocksHardLimit())
@@ -202,7 +201,8 @@ BackupProtocolClient &BackupClientContext::GetConnection()
// no -- flag so only things like deletions happen
mStorageLimitExceeded = true;
// Log
- ::syslog(LOG_WARNING, "Exceeded storage hard-limit on server -- not uploading changes to files");
+ BOX_WARNING("Exceeded storage hard-limit on server, "
+ "not uploading changes to files");
}
}
catch(...)