add method

void add(
  1. HTTPLoggerData data
)

Adds a new HTTPLoggerData instance to the logger.

When adding a new data entry, this method ensures that the total number of stored entries does not exceed the maxSize. If it does, the oldest entry is removed.

  • data: The HTTPLoggerData instance to be added to the logger.

Implementation

void add(HTTPLoggerData data) {
  _data.add(data);
  if (_data.length > maxSize) _data.removeAt(0);
}