extended diagnostics
This commit is contained in:
@@ -42,10 +42,17 @@ final _bootstrapLogger = Logger('bootstrap');
|
||||
void _setupLogging() {
|
||||
Logger.root.level = Level.ALL;
|
||||
Logger.root.onRecord.listen((record) {
|
||||
// ignore: avoid_print
|
||||
print(
|
||||
final buffer = StringBuffer(
|
||||
'${record.level.name}: ${record.time}: ${record.loggerName}: ${record.message}',
|
||||
);
|
||||
if (record.error != null) {
|
||||
buffer.write('\nerror: ${record.error}');
|
||||
}
|
||||
if (record.stackTrace != null) {
|
||||
buffer.write('\n${record.stackTrace}');
|
||||
}
|
||||
// ignore: avoid_print
|
||||
print(buffer.toString());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -65,7 +72,6 @@ void _setupErrorHandling() {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
_setupLogging();
|
||||
|
||||
Reference in New Issue
Block a user