From 0ec77367640ab06f58fab2240801b74a79a04395 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 15 Aug 2021 11:05:14 +0100 Subject: [PATCH] Log the number of XTEA keys imported This makes it a bit easier to determine if the keys are parsed correctly. Signed-off-by: Graham --- .../src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt b/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt index 96a75cf1..8035d58a 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt @@ -1,5 +1,6 @@ package org.openrs2.archive.key +import com.github.michaelbull.logging.InlineLogger import org.openrs2.crypto.XteaKey import org.openrs2.db.Database import java.nio.file.Files @@ -40,6 +41,8 @@ public class KeyImporter @Inject constructor( keys -= XteaKey.ZERO + logger.info { "Importing ${keys.size} keys" } + import(keys) } @@ -149,4 +152,8 @@ public class KeyImporter @Inject constructor( stmt.execute() } } + + private companion object { + private val logger = InlineLogger() + } }