FileSink constructor
FileSink({
- required String filename,
- LogFormatter? formatter,
- String? directory,
- bool enableRotation = false,
- int maxFileSize = 10 * 1024 * 1024,
- int maxFiles = 5,
- RotationType rotationType = RotationType.size,
Implementation
FileSink({
required String filename,
LogFormatter? formatter,
String? directory,
this.enableRotation = false,
this.maxFileSize = 10 * 1024 * 1024, // 10MB
this.maxFiles = 5,
this.rotationType = RotationType.size,
}) : _filename = filename,
_formatter = formatter ?? const JsonFormatter(),
_directory = directory;