KAA-229: fix memory corruption when the log message is too large for the buffer.
KAA-229: make logger buffer size a constructor parameter