How to capture log on each instance of the microservice through zuul

耗尽温柔 提交于 2019-12-24 11:13:04

问题


I have setup multiple instances of my microservice and registered to my eureka server. It uses ribbon for client side load balancing and uses zuul as gateway server. All usual stuff. I would like to capture the logs of which instance of my service is responding for each request. So that I can able to bring some conclusion based on my usage of each instances. How to do that?


回答1:


You can try to set the loglevel just of the LoadBalancerContext to debug in application.properties

#logging
logging.level.com.netflix.loadbalancer.LoadBalancerContext=DEBUG


来源:https://stackoverflow.com/questions/46143509/how-to-capture-log-on-each-instance-of-the-microservice-through-zuul

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!