From 1e0b1321c44e4be2f56c0e8750354519845c6ba8 Mon Sep 17 00:00:00 2001 From: Dylan Mulligan Date: Tue, 28 Nov 2023 14:40:19 -0500 Subject: [PATCH] Improve logging --- .../src/main/java/dictionary/ProductDictionary.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/productnameextractor/src/main/java/dictionary/ProductDictionary.java b/productnameextractor/src/main/java/dictionary/ProductDictionary.java index 0cc4e603f..f4c5ef260 100644 --- a/productnameextractor/src/main/java/dictionary/ProductDictionary.java +++ b/productnameextractor/src/main/java/dictionary/ProductDictionary.java @@ -120,10 +120,11 @@ public static void initializeProductDict(){ final long timeSinceLastFullPull = Duration.between(productDictLastCompilationDate, Instant.now()).getSeconds(); final long timeSinceLastRefresh = Duration.between(productDictLastRefreshDate, Instant.now()).getSeconds(); - logger.info("Successfully read {} products from file '{}' ({} day(s) old)", + logger.info("Successfully read {} products from file '{}' ({} day(s) since refresh, {} day(s) since full query)", productDict.size(), - productDictName, - Math.floor((float) timeSinceLastRefresh / 3600 / 24 * 10) / 10 // seconds -> hours + productDictPath, + Math.floor((float) timeSinceLastRefresh / 3600 / 24 * 10) / 10, // seconds -> hours + Math.floor((float) timeSinceLastFullPull / 3600 / 24 * 10) / 10 // seconds -> hours ); // Update dictionary as needed