It really depends on how much you are printing.
If your program is printing 50 or more lines per second then I bet output starts to become significant.
Output to a file is definitely much faster than printing to a terminal, though different terminal programs will vary significantly in their speed, depending on how much rendering they are doing and what they use for the rendering api.
I very much doubt there is any significant performance difference for cout vs. ofstream for performance of terminal printing or even output to a file. There might be a very small performance gain if you wrote log lines using fwrite. Ultimately things like cout will call fwrite, so you can get a small improvement by just calling down to that lowest level yourself.
Finally - output streams like cout are faster than error streams like cerr. Cout will do more buffering than cerr, performance can be significantly faster. But it looks like you are using cout already.