From bebf5c83daf694b8a17cca6b858e4eca3fc75647 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Thu, 31 May 2018 22:36:01 -0400 Subject: [PATCH] exec, spawn, and run won't log when disableLog is set --- src/NetscriptEvaluator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NetscriptEvaluator.js b/src/NetscriptEvaluator.js index ff49584c2..81e58cb0b 100644 --- a/src/NetscriptEvaluator.js +++ b/src/NetscriptEvaluator.js @@ -833,7 +833,9 @@ function runScriptFromScript(server, scriptname, args, workerScript, threads=1) return Promise.resolve(false); } else { //Able to run script - workerScript.scriptRef.log("Running script: " + scriptname + " on " + server.hostname + " with " + threads + " threads and args: " + printArray(args) + ". May take a few seconds to start up..."); + if(workerScript.disableLogs.ALL == null && workerScript.disableLogs.exec == null && workerScript.disableLogs.run == null && workerScript.disableLogs.spawn == null) { + workerScript.scriptRef.log("Running script: " + scriptname + " on " + server.hostname + " with " + threads + " threads and args: " + printArray(args) + ". May take a few seconds to start up..."); + } var runningScriptObj = new RunningScript(script, args); runningScriptObj.threads = threads; server.runningScripts.push(runningScriptObj); //Push onto runningScripts