Skip to content

Commit

Permalink
Update log.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Sep 28, 2023
1 parent 308ab85 commit a7e1368
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dio/lib/src/interceptors/log.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import 'dart:developer';

import '../dio_exception.dart';
import '../dio_mixin.dart';
import '../options.dart';
import '../response.dart';

/// [LogInterceptor] is used to print logs during network requests.
/// [LogInterceptor] should be the last interceptor added,
/// It should be the last interceptor added,
/// otherwise modifications by following interceptors will not be logged.
/// This is because the execution of interceptors is in the order of addition.
///
Expand All @@ -15,9 +13,11 @@ import '../response.dart';
/// Alternatively `dart:developer`'s `log` function can also be used.
///
/// ```dart
/// dio.interceptors.add(LogInterceptor(
/// logPrint: (o) => debugPrint(o.toString()),
/// ));
/// dio.interceptors.add(
/// LogInterceptor(
/// logPrint: (o) => debugPrint(o.toString()),
/// ),
/// );
/// ```
class LogInterceptor extends Interceptor {
LogInterceptor({
Expand Down

0 comments on commit a7e1368

Please sign in to comment.