There's no way to answer this with certainty without knowing exactly what your progress-bar program is doing, but...
The way such a progress bar is typically done is by outputting the current progress update, but then putting an ascii CR (carriage return) at the end of the line without an LF (line feed). This resets the display cursor to the beginning of the line without moving the cursor down to the next line so that each subsequent progress update overwrites the previous one. So probably, if you're redirecting that to a file, you'll have the same content in the file.
If you were to view such a file with vi, you'll actually see the embedded CRs, indicated as "^M" (but note that LF characters are simply interpreted as end-of-line and aren't actually displayed). If you view the file with another editor, it might interpret CR characters as a valid end-of-line indicator and show you each line as a separate line with or without LF characters.
You don't say how you're displaying the log.txt file. I would expect that if the program were using the embedded CR method, then using "cat log.txt" would show the same output as in interactive use: that is, each progress update "line" would overwrite the previous one and only the last one would be visible at the end.
It's also possible that the program outputting the progress bar is sensitive to whether it's displaying to a terminal device or not: i.e. it might be calling isatty() and modifying its output accordingly.
It might be instructive to run this command on your final log.txt file to see the actual binary content:
od -tx1z log.txt
A CR (aka ^M) will show up as "0d". An LF (aka ^J) will show up as 0a.