Erweiterungen
This commit is contained in:
1 parent
054dfe616e
commit
a987983b63
1 file changed
+8
@@ -44,6 +44,8 @@ Future<void> main() async {
|
||||
PictureSchema
|
||||
], directory: dir.path, name: "database_v1");
|
||||
|
||||
await _clearLog();
|
||||
|
||||
runZonedGuarded(() {}, (error, stackTrace) {
|
||||
_traceUncaughtExceptions(error, stackTrace);
|
||||
});
|
||||
@@ -51,6 +53,12 @@ Future<void> main() async {
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
Future<void> _clearLog() async {
|
||||
var dateTime = DateTime.now().add(const Duration(days: -7));
|
||||
|
||||
await MyApp.isarInstance.logEntrys.where().filter().timeLessThan(dateTime).deleteAll();
|
||||
}
|
||||
|
||||
void _traceUncaughtExceptions(Object error, StackTrace stackTrace) {
|
||||
Util.logException('Ein Fehler ist aufgetreten: $error');
|
||||
Util.logException('Stack-Trace: $stackTrace');
|
||||
|
||||
Reference in new issue
Block a user