[Box Backup-commit] COMMIT r2284 - box/trunk/bin/bbackupctl
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 14 Sep 2008 00:43:47 +0100 (BST)
Author: chris
Date: 2008-09-14 00:43:47 +0100 (Sun, 14 Sep 2008)
New Revision: 2284
Modified:
box/trunk/bin/bbackupctl/bbackupctl.cpp
Log:
Log which command succeeded or failed, rather than just "Succeeded",
which is not very helpful in system logs.
Modified: box/trunk/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/trunk/bin/bbackupctl/bbackupctl.cpp 2008-09-13 15:31:26 UTC (rev 2283)
+++ box/trunk/bin/bbackupctl/bbackupctl.cpp 2008-09-13 23:43:47 UTC (rev 2284)
@@ -257,7 +257,8 @@
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 @@
{
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;
}