From 7a1b17433bdb9d153e19f23a5bb6eb4cd199a964 Mon Sep 17 00:00:00 2001
From: eyedeekay <idki2p@i2pmail.org>
Date: Sat, 27 Jul 2024 13:43:39 -0400
Subject: [PATCH] StatManager: reduce log levels back to debug when stats are
 not present

---
 core/java/src/net/i2p/stat/StatManager.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/core/java/src/net/i2p/stat/StatManager.java b/core/java/src/net/i2p/stat/StatManager.java
index 2f3c77e422..5218b8cbc7 100644
--- a/core/java/src/net/i2p/stat/StatManager.java
+++ b/core/java/src/net/i2p/stat/StatManager.java
@@ -161,8 +161,8 @@ public class StatManager {
         if (freq != null)
             freq.eventOccurred();
         else
-            if (_log.shouldLog(Log.WARN))
-                _log.warn("Invalid frequency stat : " + name);
+            if (_log.shouldLog(Log.DEBUG)
+                _log.debug("Invalid frequency stat : " + name);
     }
 
     /** update the given rate statistic, taking note that the given data point was received (and recalculating all rates) */
@@ -171,8 +171,8 @@ public class StatManager {
         if (stat != null)
             stat.addData(data, eventDuration);
         else
-            if (_log.shouldLog(Log.WARN))
-                _log.warn("Invalid rate stat : " + name);
+            if (_log.shouldLog(Log.DEBUG)
+                _log.debug("Invalid rate stat : " + name);
     }
 
     /**
@@ -185,8 +185,8 @@ public class StatManager {
         if (stat != null)
             stat.addData(data);
         else
-            if (_log.shouldLog(Log.WARN))
-                _log.warn("Invalid rate stat : " + name);
+            if (_log.shouldLog(Log.DEBUG)
+                _log.debug("Invalid rate stat : " + name);
     }
 
     public synchronized void coalesceStats() {
-- 
GitLab