Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-mulligan committed Nov 28, 2023
1 parent d25d2b1 commit 1e0b132
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e0b132

Please sign in to comment.