LoggerConfig constructor

LoggerConfig({
  1. bool requestHeader = true,
  2. bool requestBody = true,
  3. bool responseHeader = false,
  4. bool responseBody = true,
  5. bool error = true,
  6. int maxWidth = 160,
  7. bool compact = true,
  8. bool? enabled,
})

Implementation

LoggerConfig({
  this.requestHeader = true,
  this.requestBody = true,
  this.responseHeader = false, // 默认不打印响应头,通常不重要
  this.responseBody = true,
  this.error = true,
  this.maxWidth = 160, // 更合理的宽度,适合大多数终端
  this.compact = true,
  this.enabled,
});