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