From 977f5562e4df7608ddebf72d6369097538f03d2d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 15 May 2008 17:57:14 +0200 Subject: [PATCH] Improve the debug output a bit. --- src/csync.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/csync.c b/src/csync.c index cd827319d9..3e91282b6d 100644 --- a/src/csync.c +++ b/src/csync.c @@ -300,10 +300,8 @@ int csync_update(CSYNC *ctx) { time(&finish); CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, - "Update detection for local replica took %.2f seconds", - difftime(finish, start)); - CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, - "Collected files: %lu", c_rbtree_size(ctx->local.tree)); + "Update detection for local replica took %.2f seconds walking %lu files.", + difftime(finish, start), c_rbtree_size(ctx->local.tree)); csync_memstat_check(); if (rc < 0) { @@ -320,10 +318,8 @@ int csync_update(CSYNC *ctx) { time(&finish); CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, - "Update detection for remote replica took %.2f seconds", - difftime(finish, start)); - CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, - "Collected files: %lu", c_rbtree_size(ctx->remote.tree)); + "Update detection for remote replica took %.2f seconds walking %lu files.", + difftime(finish, start), c_rbtree_size(ctx->remote.tree)); csync_memstat_check(); if (rc < 0) { @@ -353,8 +349,8 @@ int csync_reconcile(CSYNC *ctx) { time(&finish); CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, - "Reconciliation for local replica took %.2f seconds", - difftime(finish, start)); + "Reconciliation for local replica took %.2f seconds visiting %llu files.", + difftime(finish, start), c_rbtree_size(ctx->local.tree)); if (rc < 0) { return -1; @@ -369,8 +365,8 @@ int csync_reconcile(CSYNC *ctx) { time(&finish); CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, - "Reconciliation for local replica took %.2f seconds", - difftime(finish, start)); + "Reconciliation for local replica took %.2f seconds visiting %llu files.", + difftime(finish, start), c_rbtree_size(ctx->remote.tree)); if (rc < 0) { return -1; @@ -402,7 +398,7 @@ int csync_destroy(CSYNC *ctx) { csync_vio_shutdown(ctx); if (ctx->journal.db != NULL) { - if (ctx->status == CSYNC_DONE) { + if (ctx->status >= CSYNC_DONE) { time(&start); if (csync_journal_write(ctx) == 0) { jwritten = 1;