0

I am using feign clients in spring-cloud environment with the Eureka discovery service and implementing a custom feign logger to be able to log some usefull request and response information. For that I have extended feign.Logger class and overriden it's methods.

So far so good, but I am interested in logging hostname the request was forwarded to. Is there a way to get this information inside the feign.Logger?

Aleksandr Erokhin
  • 1,904
  • 3
  • 17
  • 32

2 Answers2

0

It was confirmed by @spencergibb that there is no way to get hostname in the feign Logger.

Aleksandr Erokhin
  • 1,904
  • 3
  • 17
  • 32
0

To be clear on your questions you need to get domain which request is hitting. Then you can get it by manipulating the request.url() and get the sub string from this before uri path.