"redirects" and "tee" are bitmasks specifying which std stream(s)
   to redirect to a log file in the "log_dir". Valid mask values are
   defined in "Std". To redirect/tee only certain local ranks, pass
   "redirects" as a map with the key as the local rank to specify the
   redirect behavior for. Any missing local ranks will default to
   "Std.NONE".
"tee" acts like the unix "tee" command in that it redirects +
   prints to console. To avoid worker stdout/stderr from printing to
   console, use the "redirects" parameter.
For each process, the "log_dir" will contain:


"{local_rank}/error.json": if the process failed, a file with
      the error info


"{local_rank}/stdout.json": if "redirect & STDOUT == STDOUT"


"{local_rank}/stderr.json": if "redirect & STDERR == STDERR"


Note:
 It is expected that the "log_dir" exists, is empty, and is a
 directory.

Example:
  log_dir = "/tmp/test"

  # ok; two copies of foo: foo("bar0"), foo("bar1")
