This question already has an answer here:
I have a For[...] cycle which calls a function. When the function is at work, it prints some text-string through the command Print[...].
Since I iterate the action of the function for 1000 times, the output printed starts to become very long and Mathematica starts to get slow.
Is there any way to modify the Print command or to send the output buffer into a text file which is instantaneously updated?