Skip to content
Advertisement

Override Hysterix Logging

I am trying to understand the logs generated by SpringBoot before and after implementing Hysterix Circuit Breaker

Before Hystrix the logs looked like,

JavaScript

After implementing Hystrix the logs looks like,

JavaScript

So, how did http-nio-8080-exec-2 get replaced with hystrix-OrchestratorController-1, and why it’s not showing my TransactionId when Hystrix got implemented. How did Hystrix take over the logging? What’s the difference between both? Is there any way to revert back to my old logging format? I tried hystrix.command.default.requestLog.enabled=false in my application.properties, but no luck.

Main class

JavaScript

RestController

JavaScript

application.properties

JavaScript

Advertisement

Answer

Hystrix is using its own thread instead of the local thread. That’s the reason your log looks different.

Add this property in your application.properties

JavaScript

Now hystrix will use your local thread.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement