From: Joel Rosdahl Date: Mon, 12 Mar 2018 21:05:17 +0000 (+0100) Subject: cleanup: Log size before cleaning X-Git-Tag: v3.4.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3575a9a2877005995be1076eccec390be65b78d6;p=thirdparty%2Fccache.git cleanup: Log size before cleaning --- diff --git a/src/cleanup.c b/src/cleanup.c index e0b4c620c..557a5ad8b 100644 --- a/src/cleanup.c +++ b/src/cleanup.c @@ -186,15 +186,19 @@ clean_up_dir(struct conf *conf, const char *dir, float limit_multiple) traverse(dir, traverse_fn); // Clean the cache. + cc_log("Before cleanup: %lu KiB, %zu files", + (unsigned long)cache_size / 1024, + files_in_cache); bool cleaned = sort_and_clean(); + cc_log("After cleanup: %lu KiB, %zu files", + (unsigned long)cache_size / 1024, + files_in_cache); + if (cleaned) { cc_log("Cleaned up cache directory %s", dir); stats_add_cleanup(dir, 1); } - cc_log("After cleanup: %lu KiB, %zu files", - (unsigned long)cache_size / 1024, - files_in_cache); stats_set_sizes(dir, files_in_cache, cache_size); // Free it up.