From 57598f9a3595b4f55a9ef2706416b0da46069692 Mon Sep 17 00:00:00 2001 From: Stephen Palmer Date: Wed, 11 Oct 2017 07:37:55 -0500 Subject: [PATCH] Minor fixes to debug logging when a file or directory is removed; fix a spot where an error was logged to DBG instead of ERR --- lib/cache_fs.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cache_fs.js b/lib/cache_fs.js index 28cb43e..3daf473 100644 --- a/lib/cache_fs.js +++ b/lib/cache_fs.js @@ -54,14 +54,16 @@ class CacheFS { if (fix) { try { var stat = fs.statSync(path); - if (stat.isDirectory()) + if (stat.isDirectory()) { fs.rmdirSync(path); - else + helpers.log(consts.LOG_DBG, msg + " Directory deleted."); + } else { fs.unlinkSync(path); - helpers.log(consts.LOG_DBG, msg + " File deleted."); + helpers.log(consts.LOG_DBG, msg + " File deleted."); + } } catch (err) { - helpers.log(consts.LOG_DBG, err); + helpers.log(consts.LOG_ERR, err); } } else {