Closed c-cube closed 10 years ago
My opinion is that I hate threads. dolog is supposed to be very simple (minimalist even, or zen if you prefer) so I would prefer to leave complex features outside. If users want to log less often, they should play with the log level of their messages and the log level they want to see during the runtime of their application.
Also, if the logs were not synchronous with the program, it would make debugging based on execution traces/logs much harder or even impossible
Wouldn't it be useful, in multi-threaded programs (or even just programs compiled with -thread), to have the logger run in a separate thread? In case the out_channel is slow (network, FS...), that wouldn't make the main thread block for maybe hundreds of milliseconds just for a call to Log. What's your opinion?