refactor: Remove REST logger

This commit is contained in:
Inex Code 2024-08-06 21:59:12 +03:00
parent 4445b5cba1
commit 100ad5c367

View file

@ -4,9 +4,6 @@ import 'dart:io';
import 'package:dio/dio.dart';
import 'package:dio/io.dart';
import 'package:flutter/foundation.dart';
import 'package:pretty_dio_logger/pretty_dio_logger.dart';
import 'package:selfprivacy/config/config.dart';
import 'package:selfprivacy/config/get_it_config.dart';
import 'package:selfprivacy/logic/models/console_log.dart';
import 'package:selfprivacy/utils/app_logger.dart';
@ -16,11 +13,6 @@ abstract class RestApiMap {
Future<Dio> getClient({final BaseOptions? customOptions}) async {
final Dio dio = Dio(customOptions ?? (await options));
if (hasLogger && config.shouldDebugPrint) {
dio.interceptors.add(
PrettyDioLogger(logPrint: (final object) => debugPrint('$object')),
);
}
dio.interceptors.add(ConsoleInterceptor());
dio.httpClientAdapter = IOHttpClientAdapter(
createHttpClient: () {