From d71058289c97b5fee606dc0690f1289b497a5b4f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 5 Oct 2020 16:53:45 -0700 Subject: [PATCH] feat(swingset-runner): accept '--slog FILE' to write slogfile --- packages/swingset-runner/src/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/swingset-runner/src/main.js b/packages/swingset-runner/src/main.js index 9a30496e36e..6414ff85d68 100644 --- a/packages/swingset-runner/src/main.js +++ b/packages/swingset-runner/src/main.js @@ -53,6 +53,7 @@ FLAGS may be: --logstats - log kernel stats after each block --logall - log kernel stats, block times, memory use, and disk space --logtag STR - tag for stats log file (default "runner") + --slog FILE - write swingset log to FILE --forcegc - run garbage collector after each block --batchsize N - set BATCHSIZE to N cranks (default 200) --verbose - output verbose debugging messages as it runs @@ -156,6 +157,7 @@ export async function main() { let logDisk = false; let logStats = false; let logTag = 'runner'; + let slogFile = null; let forceGC = false; let verbose = false; let doDumps = false; @@ -203,6 +205,9 @@ export async function main() { case '--logtag': logTag = argv.shift(); break; + case '--slog': + slogFile = argv.shift(); + break; case '--config': configPath = argv.shift(); break; @@ -352,6 +357,9 @@ export async function main() { if (verbose) { runtimeOptions.verbose = true; } + if (slogFile) { + runtimeOptions.slogFile = slogFile; + } let bootstrapResult; if (forceReset) { bootstrapResult = await initializeSwingset(