Skip to content

Commit

Permalink
Clean up some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Jun 1, 2024
1 parent 441dcb6 commit 1112fbd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ Future<void> main() async {
Logger.root.level = Level.ALL;
mainLogger.info("Begin");
Logger.root.onRecord.listen((event) {
if (event.loggerName == "GoLogger") {
return;
}
if (event.level.value < 1000 && event.stackTrace == null) {
logarte.info("[${event.loggerName}] ${event.message}", source: event.loggerName);
logarte.info(event.message, source: event.loggerName);
} else {
logarte.error("[${event.loggerName}] ${event.message}", stackTrace: event.stackTrace);
logarte.error(event.message, stackTrace: event.stackTrace);
}
});
initFlutter();
Expand Down

0 comments on commit 1112fbd

Please sign in to comment.