As per title. This is caused by separate std::print statements for the label and the message. Since std::print is thread-safe, combining these into a single std::println should resolve the issue.
Example of interleaved logs:
[ INFO ]: logging level set to DEBUG
[ DEBUG ]: [ INFO ]: attempting to start server (addr: 0100007f, port: 1000)
client thread shutting down
[ DEBUG ]: successfully created socket
[ DEBUG ]: successfully bound socket
[ DEBUG ]: successfully starting listening to socket
[ INFO ]: server thread shutting down```
As per title. This is caused by separate
std::print
statements for the label and the message. Sincestd::print
is thread-safe, combining these into a singlestd::println
should resolve the issue.Example of interleaved logs: