瀏覽代碼

loggging fix

Timothy Pomeroy 6 年之前
父節點
當前提交
2388e4d410
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      index.js

+ 4 - 4
index.js

@@ -241,7 +241,7 @@ const processFile = async file => {
     }); // update database with status
     return false;
   } else {
-    processOutput('\n'); // send a new line
+    process.stdout.write('\n'); // send a new line
   }
   // update database with output name
   setFile(db, file, {
@@ -353,10 +353,11 @@ const main = async () => {
     }
   }
   const watcher = chokidar.watch(watches, opts); // init our watcher
-  console.log('Watching:', watches, '\n');
+  console.log('Watching:', watches);
   watcher
     .on('add', async file => {
-      // when a new file is added ...
+      // when a file is added ...
+      console.log(` -> ${file} has been added`);
       queue.push(file); // push the file onto the queue to be processed
     })
     .on('change', file => {
@@ -369,7 +370,6 @@ const main = async () => {
       cleanup(file);
     })
     .on('error', error => {
-      // on errors ..
       console.error(` -> Error: ${error.message || error}`);
     });
 };