turanszkij / WickedEngine

3D engine with modern graphics
https://wickedengine.net
Other
5.84k stars 619 forks source link

flush debug output streams immediately #973

Closed k4ss4n closed 3 weeks ago

k4ss4n commented 3 weeks ago

using std::flush ensures debug logging even in case of unexpected termination:

"This manipulator may be used to produce an incomplete line of output immediately, e.g. when displaying output from a long-running process, logging activity of multiple threads or logging activity of a program that may crash unexpectedly."

https://en.cppreference.com/w/cpp/io/manip/flush