SessionLogger constructor
SessionLogger({
- int maxLogSize = 500,
- void onLog(
- SessionLogEntry entry
- void onLogBatch(
- List<
SessionLogEntry> entries, - LogFlushReason reason
- List<
- Duration? logInterval,
Implementation
SessionLogger({
this.maxLogSize = 500,
this.onLog,
this.onLogBatch,
this.logInterval,
}) {
if (onLogBatch != null && logInterval != null) {
final effectiveInterval = logInterval! > Duration.zero ? logInterval! : Duration.zero;
_timer = Timer.periodic(effectiveInterval, (_) => flush(reason: LogFlushReason.interval));
}
}