Skip to content

Commit

Permalink
core: disable clean logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Jul 15, 2024
1 parent 0addb27 commit 7d1c8bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions lib/controller/logs_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class _FileOutput extends LogOutput {

late final IOSink _sink;

final _cleanLogsMap = <String?, Map<String, int>>{}; // <stackTrace, <error, count>{}>{}
// final _cleanLogsMap = <String?, Map<String, int>>{}; // <stackTrace, <error, count>{}>{}

@override
Future<void> init() async {
Expand All @@ -59,9 +59,9 @@ class _FileOutput extends LogOutput {
await _sink.flush();
}
} catch (_) {}
try {
await fileClean.create();
} catch (_) {}
// try {
// await fileClean.create();
// } catch (_) {}
return await super.init();
}

Expand All @@ -76,18 +76,18 @@ class _FileOutput extends LogOutput {
} catch (_) {}
}

void _writeCleanFile(OutputEvent event) {
// -- clean logs
final stackString = event.origin.stackTrace.toString();
_cleanLogsMap[stackString] ??= <String, int>{};
_cleanLogsMap[stackString]!.update("${event.origin.error} => ${event.origin.message}", (value) => value + 1, ifAbsent: () => 1);
fileClean.writeAsJson(_cleanLogsMap);
}
// void _writeCleanFile(OutputEvent event) {
// // -- clean logs
// final stackString = event.origin.stackTrace.toString();
// _cleanLogsMap[stackString] ??= <String, int>{};
// _cleanLogsMap[stackString]!.update("${event.origin.error} => ${event.origin.message}", (value) => value + 1, ifAbsent: () => 1);
// fileClean.writeAsJson(_cleanLogsMap);
// }

@override
void output(OutputEvent event) async {
_writeMainFile(event);
_writeCleanFile(event);
// _writeCleanFile(event);
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: namida
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
publish_to: "none"
version: 3.2.7-beta+240715234
version: 3.2.8-beta+240715236

environment:
sdk: ">=3.4.0 <4.0.0"
Expand Down

0 comments on commit 7d1c8bd

Please sign in to comment.