I want to log the real time stdout from a different Class to a log file. Here is my demo code. Code works well. But it is waiting for the sample function to finish. I want to run it in parallel. So the log file will written in same time of stdout prints.I want to log the real time stdout from a diffe