InMemoryLogger class

A logger that stores HTTP request and response data in memory.

This logger is designed to keep a record of HTTP transactions in memory for easy access and debugging. It maintains a list of HTTPLoggerData instances, each representing a single HTTP request-response pair. The logger has a maximum size to limit memory usage, after which older records are discarded as new ones are added.

Constructors

InMemoryLogger({int maxSize = 100})
Constructs an instance of InMemoryLogger.

Properties

data List<HTTPLoggerData>
A list of all HTTPLoggerData entries currently stored in the logger.
no setter
hashCode int
The hash code for this object.
no setterinherited
maxSize int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(HTTPLoggerData data) → void
Adds a new HTTPLoggerData instance to the logger.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited