def redirect_io_to(log_file)
      log_file ||= "/dev/null"
      reopen_io STDIN, "/dev/null"
      reopen_io STDOUT, log_file, "a"
      reopen_io STDERR, STDOUT
      STDERR.sync = STDOUT.sync = true
    end
def redirect_io_to(log_file)
      log_file ||= "/dev/null"
      reopen_io STDIN, "/dev/null"
      reopen_io STDOUT, log_file, "a"
      reopen_io STDERR, STDOUT
      STDERR.sync = STDOUT.sync = true
    end
Redirects STDIN, STDOUT, and STDERR to the specified +log_file+
 or to /dev/null if none is given.