AsyncRotatingFileOutput constructor
AsyncRotatingFileOutput(})
Implementation
AsyncRotatingFileOutput(
this.filePath, {
this.maxSizeBytes = 10 * 1024 * 1024, // 10MB default
this.maxBackups = 5,
}) : _file = File(filePath),
_size = 0 {
final dir = _file.parent;
if (!dir.existsSync()) {
dir.createSync(recursive: true);
}
_size = _file.existsSync() ? _file.lengthSync() : 0;
}