diff --git a/src/util/rsdebug.h b/src/util/rsdebug.h index 95a9ee955..c333bd255 100644 --- a/src/util/rsdebug.h +++ b/src/util/rsdebug.h @@ -85,6 +85,7 @@ private: #include #include #include +#include enum class RsLoggerCategories { @@ -110,11 +111,12 @@ struct t_RsLogger const auto now = system_clock::now(); const auto sec = time_point_cast(now); const auto msec = duration_cast(now - sec); - const auto tFill = std::cerr.fill(); - return std::cerr << static_cast(CATEGORY) << " " - << sec.time_since_epoch().count() << "." - << std::setfill('0') << std::setw(3) << msec.count() - << std::setfill(tFill) << " " << val; + std::stringstream tstream; + tstream << static_cast(CATEGORY) << " " + << sec.time_since_epoch().count() << "." + << std::setfill('0') << std::setw(3) << msec.count() + << " " << val; + return std::cerr << tstream.str(); } /// needed for manipulators and things like std::endl