From eac5a296ab49b9bc8f8c5e56944c111aab959f77 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Mon, 9 Nov 2020 11:41:12 +0100 Subject: [PATCH] Logger: Add more logging statements --- lib/utils/logger.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/logger.dart b/lib/utils/logger.dart index 30030bef..a283b282 100644 --- a/lib/utils/logger.dart +++ b/lib/utils/logger.dart @@ -130,6 +130,7 @@ class Log { static Iterable fetchLogsForDate(DateTime date) sync* { var file = File(filePathForDate(date)); if (!file.existsSync()) { + Log.i("No log file for $date"); return; } @@ -138,7 +139,7 @@ class Log { try { yield LogMessage.fromMap(json.decode(line)); } catch (e) { - Log.e(e); + Log.e("fetchLogsForDate: $e"); } } } @@ -155,6 +156,8 @@ class Log { var fp = filePathForDate(today.add(i.days)); if (File(fp).existsSync()) { l.add(fp); + } else { + Log.i("Log file $fp not found"); } }