From d8063ef47f939dee4095d4d9e98b7feceade980c Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 10 Mar 2011 17:58:23 -0800 Subject: [PATCH] Reduce verbosity --- bluesky/log.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bluesky/log.c b/bluesky/log.c index 6ac7508..9d2550a 100644 --- a/bluesky/log.c +++ b/bluesky/log.c @@ -482,8 +482,9 @@ static void cloudlog_partial_fetch_start(BlueSkyCacheFile *cachefile, size_t offset, size_t length) { g_atomic_int_inc(&cachefile->refcount); - g_print("Starting partial fetch of %s from cloud (%zd + %zd)\n", - cachefile->filename, offset, length); + if (bluesky_verbose) + g_print("Starting partial fetch of %s from cloud (%zd + %zd)\n", + cachefile->filename, offset, length); BlueSkyStoreAsync *async = bluesky_store_async_new(cachefile->fs->store); async->op = STORE_OP_GET; async->key = g_strdup(cachefile->filename); @@ -506,7 +507,8 @@ static void cloudlog_partial_fetch_complete(BlueSkyStoreAsync *async, g_mutex_lock(cachefile->lock); if (async->result >= 0) { if (async->len == 0) { - g_print("Complete object was fetched.\n"); + if (bluesky_verbose) + g_print("Complete object was fetched.\n"); cachefile->complete = TRUE; } @@ -553,7 +555,7 @@ static void cloudlog_partial_fetch_complete(BlueSkyStoreAsync *async, bluesky_rangeset_free(items); } else { - g_print("Error fetching from cloud, retrying...\n"); + g_print("Error fetching %s from cloud, retrying...\n", async->key); cloudlog_partial_fetch_start(cachefile, async->start, async->len); } @@ -576,7 +578,8 @@ static void cloudlog_fetch_start(BlueSkyCacheFile *cachefile) { g_atomic_int_inc(&cachefile->refcount); cachefile->fetching = TRUE; - g_print("Starting fetch of %s from cloud\n", cachefile->filename); + if (bluesky_verbose) + g_print("Starting fetch of %s from cloud\n", cachefile->filename); BlueSkyStoreAsync *async = bluesky_store_async_new(cachefile->fs->store); async->op = STORE_OP_GET; async->key = g_strdup(cachefile->filename); -- 2.20.1