[ACCEPTED]-How to log make output without buffering from stdout and stderr-buffering

Accepted answer
Score: 28
make -k > build.log 2>&1

This should work better for you because 5 it is not redirecting stderr and stdout 4 separately, but redirecting stderr to stdout, which 3 should make the buffering sync up.

If you 2 want to log it to a file as well as print 1 it to the console:

make -k 2>&1 | tee build.log
Score: 5

Try this

make -k > build.log 2>&1


Score: 0

I could capture the output into 2 separate 6 log files but then I would have no info 5 on how to glue them back together into 4 a single log file.

Gluing them back together 3 is tricky but there is a right answer for 2 that too, and it works! See "How do I save or redirect stdout and stderr into different files?" by 1 Vivek Gite.

More Related questions