ApiLogConfig class

Controls which API request/response details are collected and logged.

Use with DevUILogger.init or DevUILogger.setApiLogConfig to enable or disable specific log fields at runtime.

Constructors

ApiLogConfig({bool queryParams = true, bool requestHeader = true, bool requestBody = true, bool response = true, bool responseHeader = true, bool curl = true, int? maxResponseLength, bool hideEmptyValue = true})
Creates an ApiLogConfig with the given toggles.
const

Properties

curl bool
Whether the curl command is printed to the console when a request completes.
final
hashCode int
The hash code for this object.
no setterinherited
hideEmptyValue bool
Whether to hide empty values.
final
maxResponseLength int?
The maximum length of the response body to be logged.
final
queryParams bool
Whether query parameters are captured.
final
requestBody bool
Whether request body and upload files are captured.
final
requestHeader bool
Whether request headers are captured.
final
response bool
Whether response body is captured.
final
responseHeader bool
Whether response headers are captured.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? queryParams, bool? requestHeader, bool? requestBody, bool? response, bool? responseHeader, bool? curl, int? maxResponseLength, bool? hideEmptyValue}) ApiLogConfig
Returns a copy of this config with the given fields replaced.
isLogRequest() bool
isLogResponse() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited