HttpFormatter constructor

HttpFormatter({
  1. bool includeRequest = true,
  2. bool includeRequestHeaders = true,
  3. bool includeRequestQueryParams = true,
  4. bool includeRequestBody = true,
  5. bool includeResponse = true,
  6. bool includeResponseHeaders = true,
  7. bool includeResponseBody = true,
  8. Logger? logger,
  9. HttpLoggerFilter? httpLoggerFilter,
})

Optionally can add custom LogPrinter

Implementation

HttpFormatter(
    {bool includeRequest = true,
    bool includeRequestHeaders = true,
    bool includeRequestQueryParams = true,
    bool includeRequestBody = true,
    bool includeResponse = true,
    bool includeResponseHeaders = true,
    bool includeResponseBody = true,
    Logger? logger,
    HttpLoggerFilter? httpLoggerFilter})
    : _includeRequest = includeRequest,
      _includeRequestHeaders = includeRequestHeaders,
      _includeRequestQueryParams = includeRequestQueryParams,
      _includeRequestBody = includeRequestBody,
      _includeResponse = includeResponse,
      _includeResponseHeaders = includeResponseHeaders,
      _includeResponseBody = includeResponseBody,
      _logger = logger ??
          Logger(
              printer: PrettyPrinter(
                  methodCount: 0,
                  colors: true,
                  printTime: false,
                  printEmojis: false)),
      _httpLoggerFilter = httpLoggerFilter;