Hi Carsten,
I just came across the logging change [1]/[2] you made some time ago -
due to the fact that it also compares the toString()-representations of
the checks [3] there is a lot of noise in the log file, e.g. in my
example [4] below for the memory check that remains on the same status
but slightly changes the used memory numbers.
Would it make sense to only compare the status and for the case the
status changes, log the previous and current entry but avoid logging
toString()-changes?
(assuming that memory monitoring for graphs etc. happens in an external
system)
-Georg
[1] https://issues.apache.org/jira/browse/FELIX-6447
[2]
https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
[3]
https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
[4]
07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 440,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 649,9MB, INFO Memory Usage: 21,2% of 3,0GB maximal heap
used]]
07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 415,5MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 674,5MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap
used]]
07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 415,3MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 674,7MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap
used]]
07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 391,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 698,3MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap
used]]
07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 391,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 698,6MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap
used]]
07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 365,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 724,9MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap
used]]
07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 364,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 725,3MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap
used]]
07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 343,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 746,6MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap
used]]
07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 343,2MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 746,8MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap
used]]