- don't use __PRETTY_FUNCTION__ and try to parse it, __func__ is
standardized and in most case returns what we want (the function name).
- add native support for string_view in our ostream.
- uninline string support from ostream
ostream internals are now protected by a lock, which ensures the
internal state stays consistant, however, this won't prevent
multiple threads to have their output ominterfering with each other,
which is no different from the stl behavior.
This fixes#4992
This reverts commit cc6201b0db.
On Android the loggers are not always initialized when several .so are
used, leading to crashes. It's not completely clear what is exactly
happening.
- libutil's slog, cout, cerr, cwarn and cinfo were not thread safe
at all.
- they are now thread_local
- for that reason the log buffer (which now exists per thread) is not
allocated until it's needed and is aggressively shrunk.
- removed our thread_local emulation which was incomplete.
- don't expose LogStream publicly.
Even when hex modifier is used, 'char' should be printed as characters,
this is particularly relevant with 0.
e.g. out << (char)0, should write a nul terminator, not "0".