Creates a LogBuffer with the given maximum capacity.
OptionalmaxSize: number
Maximum entries to retain; 0 disables buffering.
Appends a log line to the buffer, evicting the oldest entry when full.
The log line string to store.
Returns the most recent log entries up to the requested count.
Optionalcount: number
Maximum number of entries to return; defaults to all stored entries.
Array of log line strings, oldest first.
Returns the current number of stored entries.
Number of entries currently in the buffer.
Resets the buffer to an empty state, discarding all stored entries.
Indicates whether buffering is active (maxSize > 0).
True when the buffer has a non-zero capacity.
O(1) circular ring buffer for storing recent log entries.