wjgra / arq-benchmark

0 stars 0 forks source link

[util] Interleaved logging messages when running both server and client in launcher #2

Closed wjgra closed 2 months ago

wjgra commented 2 months ago

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```