|
|
|
|
|
by alexkus
4571 days ago
|
|
No, you can prevent unbounded growth by using a pre-allocated cyclic buffer and just write into that. We have prototypes of this in our software (but not production code yet) with buffers that default to 50MB. That gives a nice amount of debug info in the run up to any errors. Whenever the buffer is dumped out you simply set the begin/end pointers of the cyclic buffer to be the same so that subsequent errors don't write out an entire copy of the buffer again, only the new log messages since the previous error. |
|