Reputation: 678
I'm creating a microservices system and I have Zuul server where I use Ribbon which connects to Eureka(which returns me the available service instances) and perform load-balancing. Everything works great, however I would like to see in the logs which particular instance was chosen by Ribbon. I know that I can add some extra logging to the instances but I want to have it in one place. I've read Ribbon documentation and I haven't found any information how to do it... I would be very grateful for your help.
Upvotes: 2
Views: 1320
Reputation: 11
Try to add DEBUG logger level:
It's printing messages like:
my-service using LB returned Server: host:port for request http:request-url
Got error java.net.ConnectException: Connection refused (Connection refused) when executed on server host:port
For example my logback.groovy has a line:
logger('com.netflix', DEBUG)
Upvotes: 1