How to save output of REPL terminal in VS code

Hi,
I am working with the neuralODE examples and I see the loss values getting outputted in the REPL Terminal of VSCode.
Is there any way to write all of the output into a file ?

I checked the forum but could not find an easy fix.

You may take a look at this post