Logging: use a TLS buffer and increase its size
The logging system's line buffer is on the stack, and its current size
is 512. This means any log line which is larger than 512 bytes (this can
happen with some warnings/errors with a lot of information) gets
truncated.
In order to make this buffer size arbitrarily large, use a TLS global
buffer instead.
Increase the logging system's line buffer to 16 kiB (per thread).
Drawback: the logging system had a static assertion which ensured that
the line buffer size was not greater than PIPE_BUF so that individual
write operations were atomic. With a line buffer size larger than
PIPE_BUF, different threads could write to the output stream at the same
time which could result in interlaced data. We need to add some locking
to support multithreaded logging.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.024381 seconds and 5 git commands to generate.