fix #225 add logging to different streams for different processes.
Merge pull request #234 from whjiang/logging

fix #225 enable logging to different streams