Skip to content

Commit

Permalink
Remove conditional logging from backend and apply it on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsinghshubham777 committed Sep 30, 2024
1 parent 3c9984a commit 3e16871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 1 addition & 7 deletions backend/src/utils/global_instances.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import 'dart:io';

import 'package:logger/logger.dart';

final logger = Logger(
filter: Platform.environment['CORS_URL']?.contains('0.0.0.0') ?? false
? DevelopmentFilter()
: ProductionFilter(),
);
final logger = Logger();
3 changes: 3 additions & 0 deletions frontend/lib/common/providers.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:frontend/utils/extensions.dart';
import 'package:pretty_dio_logger/pretty_dio_logger.dart';
Expand Down Expand Up @@ -36,6 +37,8 @@ Dio dio(DioRef ref) {
},
),
PrettyDioLogger(
// ignore: avoid_redundant_argument_values
enabled: kDebugMode,
requestHeader: true,
requestBody: true,
responseHeader: true,
Expand Down

0 comments on commit 3e16871

Please sign in to comment.