Gildas пре 7 година
родитељ
комит
45d8ba0d15
1 измењених фајлова са 10 додато и 6 уклоњено
  1. 10 6
      lib/single-file/single-file-core.js

+ 10 - 6
lib/single-file/single-file-core.js

@@ -183,17 +183,17 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 
 		async executeStage(step) {
 			if (DEBUG) {
-				console.log("-- STARTED STAGE", step, "--"); // eslint-disable-line no-console
+				log("** STARTED STAGE", step, "**");
 			}
 			STAGES[step].sequential.forEach(task => {
 				let startTime;
 				if (DEBUG) {
 					startTime = Date.now();
-					console.log("STARTED", task.action); // eslint-disable-line no-console
+					log("  -- STARTED", task.action, "...");
 				}
 				this.executeTask(task, !step);
 				if (DEBUG) {
-					console.log("ENDED", task.action, Date.now() - startTime); // eslint-disable-line no-console
+					log("  -- ENDED  ", task.action, Date.now() - startTime);
 				}
 			});
 			if (STAGES[step].parallel) {
@@ -201,17 +201,17 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 					let startTime;
 					if (DEBUG) {
 						startTime = Date.now();
-						console.log("STARTED", task.action); // eslint-disable-line no-console
+						log("  // STARTED", task.action, "...");
 					}
 					const promise = this.executeTask(task, !step);
 					if (DEBUG) {
-						promise.then(() => console.log("ENDED", task.action, Date.now() - startTime)); // eslint-disable-line no-console
+						promise.then(() => log("  // ENDED", task.action, Date.now() - startTime));
 					}
 					return promise;
 				}));
 			}
 			if (DEBUG) {
-				console.log("-- ENDED STAGE", step, "--"); // eslint-disable-line no-console
+				log("** ENDED   STAGE", step, "**");
 			}
 		}
 
@@ -1211,6 +1211,10 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 
 	}
 
+	function log(...args) {
+		console.log("S-File", ...args); // eslint-disable-line no-console
+	}
+
 	// -----
 	// Stats
 	// -----