mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
Merge pull request #1982 from wynro/add-ALL-to-enableLog
Add support for ALL argument in enableLog function
This commit is contained in:
commit
0ff110492e
@ -754,7 +754,12 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
}
|
||||
},
|
||||
enableLog: function (fn: any): any {
|
||||
if (possibleLogs[fn] === undefined) {
|
||||
if (fn === "ALL") {
|
||||
for (fn in possibleLogs) {
|
||||
delete workerScript.disableLogs[fn];
|
||||
}
|
||||
workerScript.log("enableLog", () => `Enabled logging for all functions`);
|
||||
} else if (possibleLogs[fn] === undefined) {
|
||||
throw makeRuntimeErrorMsg("enableLog", `Invalid argument: ${fn}.`);
|
||||
}
|
||||
delete workerScript.disableLogs[fn];
|
||||
|
Loading…
Reference in New Issue
Block a user