From 345ec7aba55ef0bb59f3f58480da3b7072efc76c Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 25 May 2021 18:16:50 +0200 Subject: [PATCH] Improve probing setting management. --- src/fr/devinsy/statoolinfos/core/Configuration.java | 8 +++++++- src/fr/devinsy/statoolinfos/metrics/Prober.java | 2 ++ .../devinsy/statoolinfos/metrics/http/VisitCounters.java | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/core/Configuration.java b/src/fr/devinsy/statoolinfos/core/Configuration.java index ca26c5f..1f610f5 100644 --- a/src/fr/devinsy/statoolinfos/core/Configuration.java +++ b/src/fr/devinsy/statoolinfos/core/Configuration.java @@ -398,7 +398,13 @@ public class Configuration extends PathPropertyList String types = get("conf.probe.types"); if (!StringUtils.isBlank(types)) { - result.append(types.split("[, ;]")); + for (String token : types.split("[, ;]")) + { + if (!StringUtils.isBlank(token)) + { + result.append(token); + } + } } // diff --git a/src/fr/devinsy/statoolinfos/metrics/Prober.java b/src/fr/devinsy/statoolinfos/metrics/Prober.java index dfd1661..aba9f75 100644 --- a/src/fr/devinsy/statoolinfos/metrics/Prober.java +++ b/src/fr/devinsy/statoolinfos/metrics/Prober.java @@ -66,6 +66,8 @@ public class Prober { StringList types = configuration.getProbeTypes(); + System.out.println("Targets=" + types.toStringWithBrackets()); + PathCounters counters = new PathCounters(); // diff --git a/src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java b/src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java index 6c7ed63..f4ed6ff 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java +++ b/src/fr/devinsy/statoolinfos/metrics/http/VisitCounters.java @@ -117,7 +117,7 @@ public class VisitCounters extends HashMap } } - logger.info("timemark/count = {}/{}", timemark, count); + // logger.info("timemark/count = {}/{}", timemark, count); result.inc(count, prefix, timemark); }