I have made a toy interactive console program that is basically an interpreter:
$ myprogram > this is user input this is program output
The simpler form could be
tee >(myprogram) | tee -a file.log
If you want to prevent input being shown again to the screen:
tee -a file.log | myprogram | tee -a file.log