How to enable Hystrix DEBUG level logging
Asked Answered
I

1

7

I have implemented Netflix OSS Hystrix in one of my Spring boot application. And configured some properties for the HystrixCommand. But how can I verify that those properties are really used by HystrixCommand. For example,

hystrix.threadpool.default.maxQueueSize=12
hystrix.threadpool.default.keepAliveTimeMinute=2
hystrix.command.default.execution.isolation.strategy=SEMAPHORE

How can I see that these properties are applied to HystrixCommand? Is there any way I can enable debug level logging for Hystrix?

TIA

Indite answered 23/2, 2018 at 17:6 Comment(0)
I
6

I think I found the answer. Adding below line generates Hystrix DEBUG level logging.

logging:
  level:
   com.netflix.hystrix: DEBUG
Indite answered 24/2, 2018 at 4:5 Comment(3)
is this level also log data for metrices like : when circiuit breaker resumed to normal, How many request was in queue, How long it was in queue, when circuit breaker opened.?Amu
Any I dea baout how to do it for custom command in logback.xml?Amu
I enabled logging like this and was wondering why I still do not see logs. If you are in the same situation, check the following: 1. Make sure circuit breaker is actually enabled (spring.cloud.circuit.breaker.enabled:true) 2. You will not see the debug logs on service start; the logs are only shown when you do the actual request where hystrix is involved. 3. The logs are only shown for the first request with hystrix; for the following requests there won't be any debug logs againItaly

© 2022 - 2024 — McMap. All rights reserved.