summaryrefslogtreecommitdiff
path: root/bin/bbackupctl/bbackupctl.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-09-13 23:43:47 +0000
committerChris Wilson <chris+github@qwirx.com>2008-09-13 23:43:47 +0000
commitb6dd422728b2adab1d4d2c7a5d477aecc9c37cfa (patch)
tree243743f7832946babaaf8c1205b552eed07606b1 /bin/bbackupctl/bbackupctl.cpp
parent8bee9612b7ec62bb9eddcba0fdc5efcf3554f91c (diff)
Log which command succeeded or failed, rather than just "Succeeded",
which is not very helpful in system logs.
Diffstat (limited to 'bin/bbackupctl/bbackupctl.cpp')
-rw-r--r--bin/bbackupctl/bbackupctl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp
index 16de4ebc..52f7c2ed 100644
--- a/bin/bbackupctl/bbackupctl.cpp
+++ b/bin/bbackupctl/bbackupctl.cpp
@@ -257,7 +257,8 @@ int main(int argc, const char *argv[])
case SyncAndWaitForEnd:
{
// send a sync command
- std::string cmd("force-sync\n");
+ commandName = "force-sync";
+ std::string cmd = commandName + "\n";
connection.Write(cmd.c_str(), cmd.size());
connection.WriteAllBuffered();
@@ -337,13 +338,17 @@ int main(int argc, const char *argv[])
{
if(!quiet)
{
- BOX_INFO("Succeeded.");
+ BOX_INFO("Control command "
+ "succeeded: " <<
+ commandName);
}
finished = true;
}
else if(line == "error")
{
- BOX_ERROR("Check command spelling");
+ BOX_ERROR("Control command failed: " <<
+ commandName << ". Check "
+ "command spelling");
returnCode = 1;
finished = true;
}