From 277643f8c39ad02d9485f7fc9039243f098ec383 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 15 Feb 2024 21:59:56 +0100 Subject: use higher priority and add logging --- src/main/kotlin/moe/nea/ledger/LedgerLogger.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/moe/nea/ledger/LedgerLogger.kt') diff --git a/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt b/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt index 548b09d..7690d25 100644 --- a/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt +++ b/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt @@ -33,6 +33,7 @@ class LedgerLogger { val entries = JsonArray() fun logEntry(entry: LedgerEntry) { + Ledger.logger.info("Logging entry of type ${entry.transactionType}") entries.add(entry.intoJson()) commit() } @@ -41,7 +42,7 @@ class LedgerLogger { try { file.writeText(gson.toJson(entries)) } catch (ex: Exception) { - ex.printStackTrace() + Ledger.logger.error("Could not save file", ex) } } -- cgit