TeeLogger and stdout/stderr redirection

Hi, I would like to run some code and get all the outputs: (1) either on the console or (2) redirected to a file or (3) both at the same time. I have been using Logging utilities and LoggingExtras to define a TeeLogger to deal with (3), which works well to handle the log messages… the problem is that I would like to do the same with all outputs, including e.g. the output of the println statements. I tried to use redirect_stdout and the variant for stderr (to get these statement also redirected), but if I do so it then also redirects the log messages to the file, so I cannot achieve (3) anymore… Any thought on what is the correct way to do this? Is there a way to just send the Log messages to stdout and then send stdout to both console and a file?