From: Michael Vrable Date: Fri, 30 May 2008 21:55:29 +0000 (-0700) Subject: Remove some debugging output so backup runs are less verbose. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=26380fc1deafddbbc78a1621b2a69169dd5b0390;p=cumulus.git Remove some debugging output so backup runs are less verbose. --- diff --git a/remote.cc b/remote.cc index 5f04618..1384087 100644 --- a/remote.cc +++ b/remote.cc @@ -86,7 +86,6 @@ RemoteStore::~RemoteStore() * which will upload it to the remote server. */ RemoteFile *RemoteStore::alloc_file(const string &name, const string &type) { - fprintf(stderr, "Allocate file: %s\n", name.c_str()); pthread_mutex_lock(&lock); files_outstanding++; pthread_mutex_unlock(&lock); @@ -100,8 +99,6 @@ RemoteFile *RemoteStore::alloc_file(const string &name, const string &type) * responsible for its destruction. */ void RemoteStore::enqueue(RemoteFile *file) { - fprintf(stderr, "Enqueue: %s\n", file->remote_path.c_str()); - pthread_mutex_lock(&lock); while (transfer_queue.size() >= MAX_QUEUE_SIZE) @@ -118,14 +115,12 @@ void RemoteStore::enqueue(RemoteFile *file) /* Wait for all transfers to finish. */ void RemoteStore::sync() { - fprintf(stderr, "RemoteStore::sync() start\n"); pthread_mutex_lock(&lock); while (busy) pthread_cond_wait(&cond, &lock); pthread_mutex_unlock(&lock); - fprintf(stderr, "RemoteStore::sync() end\n"); } void *RemoteStore::start_transfer_thread(void *arg) @@ -161,7 +156,6 @@ void RemoteStore::transfer_thread() pthread_mutex_unlock(&lock); // Transfer the file - fprintf(stderr, "Start transfer: %s\n", file->remote_path.c_str()); if (backup_script != "") { pid_t pid = fork(); if (pid < 0) { @@ -188,7 +182,6 @@ void RemoteStore::transfer_thread() file->local_path.c_str()); } } - fprintf(stderr, "Finish transfer: %s\n", file->remote_path.c_str()); delete file; } diff --git a/scandir.cc b/scandir.cc index 8360763..a005d41 100644 --- a/scandir.cc +++ b/scandir.cc @@ -415,7 +415,6 @@ void scanfile(const string& path, bool include) for (list::iterator i = includes.begin(); i != includes.end(); ++i) { if (path == *i) { - printf("Including %s\n", path.c_str()); include = true; } } @@ -423,7 +422,6 @@ void scanfile(const string& path, bool include) for (list::iterator i = excludes.begin(); i != excludes.end(); ++i) { if (path == *i) { - printf("Excluding %s\n", path.c_str()); include = false; } } @@ -431,7 +429,6 @@ void scanfile(const string& path, bool include) for (list::iterator i = searches.begin(); i != searches.end(); ++i) { if (path == *i) { - printf("Scanning %s\n", path.c_str()); scan_only = true; } } @@ -532,7 +529,6 @@ void scanfile(const string& path, bool include) * themselves are excluded from being backed up. */ void add_include(const char *path) { - printf("Add: %s\n", path); /* Was an absolute path specified? If so, we'll need to start scanning * from the root directory. Make sure that the user was consistent in * providing either all relative paths or all absolute paths. */ @@ -717,28 +713,6 @@ int main(int argc, char *argv[]) return 1; } - // Dump paths for debugging/informational purposes - { - list::const_iterator i; - - printf("LBS Version: %s\n", lbs_version); - - printf("--dest=%s\n--localdb=%s\n--upload-script=%s\n", - backup_dest.c_str(), localdb_dir.c_str(), backup_script.c_str()); - - printf("Includes:\n"); - for (i = includes.begin(); i != includes.end(); ++i) - printf(" %s\n", i->c_str()); - - printf("Excludes:\n"); - for (i = excludes.begin(); i != excludes.end(); ++i) - printf(" %s\n", i->c_str()); - - printf("Searching:\n"); - for (i = searches.begin(); i != searches.end(); ++i) - printf(" %s\n", i->c_str()); - } - block_buf = new char[LBS_BLOCK_SIZE]; /* Initialize the remote storage layer. If using an upload script, create