HttpLogStorage class
Asynchronous NDJSON file storage for HTTP request logs.
Writes are batched and flushed periodically to avoid blocking the main
thread. The file is stored in the system temp directory under
runtime_insight/http_logs.ndjson.
Constructors
- HttpLogStorage({int maxLogs = 500})
Properties
Methods
-
clear(
) → Future< void> - Deletes the log file.
-
dispose(
) → void - Cancels any pending flush timer.
-
enqueue(
HttpRequestLog log) → void - Enqueues a log for async writing. Starts a flush timer if not running.
-
export(
String path) → Future< void> -
Copies the log file to
path. -
flush(
) → Future< void> - Writes all pending logs to the NDJSON file.
-
loadLogs(
) → Future< List< HttpRequestLog> > - Loads persisted logs from the NDJSON file.
-
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