add --logdir option to dump logs files of each stage.
Merge branch 'master' into split-new

* master:
  add --logdir option to dump logs files of each stage.