From 3b4128b0b951cee8552088ecc594fda0519dc986 Mon Sep 17 00:00:00 2001 From: Matt Jacobs Date: Tue, 8 Mar 2016 13:35:15 -0800 Subject: [PATCH] Turning down loglevels of metrics streams --- .../contrib/metrics/eventstream/HystrixMetricsPoller.java | 4 ++-- .../metrics/eventstream/HystrixMetricsStreamServlet.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsPoller.java b/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsPoller.java index 1b1ded997..ff09d9cda 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsPoller.java +++ b/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsPoller.java @@ -93,7 +93,7 @@ public HystrixMetricsPoller(MetricsAsJsonPollerListener listener, int delay) { public synchronized void start() { // use compareAndSet to make sure it starts only once and when not running if (running.compareAndSet(false, true)) { - logger.info("Starting HystrixMetricsPoller"); + logger.debug("Starting HystrixMetricsPoller"); try { scheduledTask = executor.scheduleWithFixedDelay(new MetricsPoller(listener), 0, delay, TimeUnit.MILLISECONDS); } catch (Throwable ex) { @@ -110,7 +110,7 @@ public synchronized void start() { public synchronized void pause() { // use compareAndSet to make sure it stops only once and when running if (running.compareAndSet(true, false)) { - logger.info("Stopping the HystrixMetricsPoller"); + logger.debug("Stopping the HystrixMetricsPoller"); scheduledTask.cancel(true); } else { logger.debug("Attempted to pause a stopped poller"); diff --git a/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsStreamServlet.java b/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsStreamServlet.java index aafafe9a6..60714d4fc 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsStreamServlet.java +++ b/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsStreamServlet.java @@ -137,7 +137,7 @@ private void handleRequest(HttpServletRequest request, HttpServletResponse respo poller = new HystrixMetricsPoller(jsonListener, delay); // start polling and it will write directly to the output stream poller.start(); - logger.info("Starting poller"); + logger.debug("Starting poller"); // we will use a "single-writer" approach where the Servlet thread does all the writing // by fetching JSON messages from the MetricJsonListener to write them to the output @@ -172,7 +172,7 @@ private void handleRequest(HttpServletRequest request, HttpServletResponse respo } } catch (InterruptedException e) { poller.shutdown(); - logger.debug("InterruptedException. Will stop polling."); + logger.debug("InterruptedException. Will stop polling."); Thread.currentThread().interrupt(); } catch (IOException e) { poller.shutdown(); @@ -180,7 +180,7 @@ private void handleRequest(HttpServletRequest request, HttpServletResponse respo logger.debug("IOException while trying to write (generally caused by client disconnecting). Will stop polling.", e); } catch (Exception e) { poller.shutdown(); - logger.error("Failed to write. Will stop polling.", e); + logger.error("Failed to write Hystrix metrics. Will stop polling.", e); } logger.debug("Stopping Turbine stream to connection"); }