static void logModuleOutput() { final File logFile = getProgramFile("output.txt"); final LineBuffer buf = new(voidfunc(S line) { appendToTextFile(logFile, "[" + localDateWithMilliseconds() + "] " + line + "\n"); }); print_forAllThreads(voidfunc(S s) { buf.append(s); }); }