TF-1984 Update logger by standard format
(cherry picked from commit 08110ffa7189d8f511fe8d69a948f37c695d667c)
This commit is contained in:
@@ -40,13 +40,13 @@ void logError(String? value) => log(value, level: Level.error);
|
|||||||
void initLogger(VoidCallback runApp) {
|
void initLogger(VoidCallback runApp) {
|
||||||
runZonedGuarded(() async {
|
runZonedGuarded(() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
FlutterError.onError = (FlutterErrorDetails details) {
|
FlutterError.onError = (details) {
|
||||||
FlutterError.dumpErrorToConsole(details);
|
FlutterError.dumpErrorToConsole(details);
|
||||||
logError(details.stack.toString());
|
logError('AppLogger::initLogger::runZonedGuarded:FlutterError.onError: ${details.stack.toString()}');
|
||||||
};
|
};
|
||||||
runApp.call();
|
runApp.call();
|
||||||
}, (Object error, StackTrace stack) {
|
}, (error, stack) {
|
||||||
logError(stack.toString());
|
logError('AppLogger::initLogger::runZonedGuarded:onError: $error | stack: $stack');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user