LoggerInterceptor class
Logger Interceptor This class provides logging functionality for API requests and responses. It logs request details, responses, and errors to help with debugging and monitoring.
An interceptor that logs API request and response details.
- Inheritance
-
- Object
- Interceptor
- QueuedInterceptor
- QueuedInterceptorsWrapper
- LoggerInterceptor
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
DioException err, ErrorInterceptorHandler handler) → void -
Logs errors encountered during API requests.
override
-
onRequest(
RequestOptions options, RequestInterceptorHandler handler) → void -
Logs details of an outgoing API request.
override
-
onResponse(
Response response, ResponseInterceptorHandler handler) → void -
Logs API responses and handles empty response errors.
override
-
sendErr(
Response response, ResponseInterceptorHandler handler) → void - Handles cases where the API response is empty or null.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited