EffDioLogger.compat constructor
EffDioLogger.compat({
- bool request = true,
- bool requestHeader = false,
- bool requestBody = false,
- bool responseHeader = false,
- bool responseBody = true,
- bool error = true,
- bool filter(
- RequestOptions options,
- FilterArgs args
- int lineWidth = 162,
- int? maxWidth = 324,
- bool compact = true,
- bool prettyJson = false,
- void logPrint(
- Object object
- String logLineBreak = '\n',
- bool enabled = true,
- String? reqExtra(
- RequestOptions req
- String? rspExtra(
- Response rsp
- String? errExtra(
- DioException err
兼容 EfficientDioLogger 默认构造的输出行为.
prettyJson is still opt-in here, so compat mode keeps the previous
single-line output unless it is explicitly enabled.
Example:
EffDioLogger.compat(prettyJson: true, compact: false, maxWidth: null)
Implementation
EffDioLogger.compat({
this.request = true,
this.requestHeader = false,
this.requestBody = false,
this.responseHeader = false,
this.responseBody = true,
this.error = true,
this.filter,
this.lineWidth = 162,
this.maxWidth = 324,
this.compact = true,
this.prettyJson = false,
void Function(Object object)? logPrint,
this.logLineBreak = '\n',
this.enabled = true,
this.reqExtra,
this.rspExtra,
this.errExtra,
}) : _mode = _EffDioLoggerMode.compat,
logPrint = (logPrint ?? Logger('EffLogger').info);