FileSink constructor

FileSink({
  1. required String filename,
  2. LogFormatter? formatter,
  3. String? directory,
  4. bool enableRotation = false,
  5. int maxFileSize = 10 * 1024 * 1024,
  6. int maxFiles = 5,
  7. 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;