Use logging library

This commit is contained in:
2024-12-21 22:04:20 +01:00
parent ff7c01c166
commit ba83b5ebf8
6 changed files with 72 additions and 25 deletions

View File

@@ -1,8 +1,17 @@
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'login_page.dart';
void main() {
Logger.root.level = Level.ALL; // defaults to Level.INFO
Logger.root.onRecord.listen((record) {
debugPrint('${record.level.name}: ${record.time}: ${record.message}');
if (record.error != null) {
debugPrint('${record.error}');
}
});
runApp(const MyApp());
}