Flush each log message in web builds
This commit is contained in:
parent
c5b245eef8
commit
793f83f666
1 changed files with 5 additions and 0 deletions
|
|
@ -89,7 +89,12 @@ namespace psemek::log
|
||||||
|
|
||||||
std::lock_guard lock{sinks_mutex};
|
std::lock_guard lock{sinks_mutex};
|
||||||
for (auto const & sink : sinks)
|
for (auto const & sink : sinks)
|
||||||
|
{
|
||||||
sink->put_message(msg);
|
sink->put_message(msg);
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
sink->flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ::tm safe_localtime(std::time_t const & time)
|
static ::tm safe_localtime(std::time_t const & time)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue