EffDioLogger constructor

EffDioLogger({
  1. bool request = true,
  2. bool requestHeader = true,
  3. bool requestBody = true,
  4. bool responseHeader = false,
  5. bool responseBody = true,
  6. bool error = true,
  7. bool filter(
    1. RequestOptions options,
    2. FilterArgs args
    )?,
  8. int lineWidth = 162,
  9. bool compact = true,
  10. int? maxWidth = 324,
  11. void logPrint(
    1. Object object
    )?,
  12. String logLineBreak = '\n',
  13. bool enabled = true,
  14. String? reqExtra(
    1. RequestOptions req
    )?,
  15. String? rspExtra(
    1. Response rsp
    )?,
  16. String? errExtra(
    1. DioException err
    )?,
})

Implementation

EffDioLogger({
  this.request = true,
  this.requestHeader = true,
  this.requestBody = true,
  this.responseHeader = false,
  this.responseBody = true,
  this.error = true,
  this.filter,
  this.lineWidth = 162,
  this.compact = true,
  this.maxWidth = 324,
  void Function(Object object)? logPrint,
  this.logLineBreak = '\n', // or '␤', '¶'
  this.enabled = true,
  this.reqExtra,
  this.rspExtra,
  this.errExtra,
})  : _mode = _EffDioLoggerMode.lightweight,
      logPrint = (logPrint ?? Logger('EffLogger').info);