I have found some bugs in the last version of the
Common C++ in slog.cpp.
The next comments according to the sections in the
attached patch file.
1. I think fflush() method must be called after each
writings due to some debugged program may exits
incorrectly and all log data are lost.
2. std::cout is not thread-safe. Hence, we need to wrap
call of std::cout by mutex.
Additionally, I have a some feature request.
My project operates with binary data packets up to 128
bytes.
And I should like to send this data packet as a _hex_
dump to the log file to the whole line. But ThreadImpl
class and Slog::overflow() have static buffer for log
messages (128 and 256 bytes correspondingly). How can I
set the high buffer size? I consider that will be
better to set the buffer size dinamically by
constructor of Slog (or approah mechanizm).
patch for found issues