@@ -128,10 +128,11 @@ -setvars VAR1=val1,VAR2=val2 : Add environment variables to a run NB// these are overwritten by values set in config files. -server -|hostname : start the server (reduces contention on megatest.db), use - to automatically figure out hostname -daemonize : fork into background and disconnect from stdin/out + -log logfile : send stdout and stderr to logfile -list-servers : list the servers -stop-server id : stop server specified by id (see output of -list-servers), use 0 to kill all -repl : start a repl (useful for extending megatest) -load file.scm : load and run file.scm @@ -220,10 +221,11 @@ "-dumpmode" "-run-id" "-ping" "-refdb2dat" "-o" + "-log" ) (list "-h" "-help" "--help" "-version" "-force" "-xterm" @@ -274,10 +276,16 @@ "-q" ;; quiet 0, errors/warnings only ) args:arg-hash 0)) +(if (args:get-arg "-log") + (let ((oup (open-output-file (args:get-arg "-log")))) + (debug:print-info 0 "Sending log output to " (args:get-arg "-log")) + (current-error-port oup) + (current-output-port oup))) + (if (or (args:get-arg "-h") (args:get-arg "-help") (args:get-arg "--help")) (begin (print help)