-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feign Logging Configuration Not Working As Documented #1769
Comments
+1 |
Can you provide the projects? What version of Spring Cloud? |
Camden SR6. In terms of the projects, people have so many different preferences and such that I didn't want those to get in the way. Plus you need to have git repo setup for the config.. That's why I provided all of the code. |
Then provide it as a working project as a zip file please. It's very error prone and time consuming for us to try and copy and paste. |
@spencergibb Very error prone is an understatement. Here's a full example with step by step instructions: https://github.com/pluttrell/spring-cloud-feign-logging-not-working |
If you continue in the documentation you'll see that by default nothing is logged. You must attatch a configuration to your
|
@spencergibb Many thanks for the response. When I read the docs, it appears that we could either set the property or set the level with code (via a |
hi, i just met the same thing. @FeignClient(name = "kubo", configuration = KuboConfiguration.class)
public interface KuboClient {
@RequestMapping(value = "/kubo", method = RequestMethod.GET)
String kubo();
} and KuboConfiguration class: @Configuration
public class KuboConfiguration {
@Bean
Logger.Level feignLoggerLevel() {
return Logger.Level.FULL;
}
} when i start the application and come out this log:
and i also config the logging level in the config server. it also does not work, nothing is written to the log project address: https://github.com/gilgameshs/gilgamsh-spring-cloud-netflix |
It's not the same thing.
|
Hello there, I actually have the same issue. Can you please create an example project where feign logging is working. I guess it would help many people :) |
@fabritma @pluttrell @khannedy
|
@eacdy still doesn't work for me. No log output. |
@pengisgood could you provide your config/code so that others can help you |
@kylewu I do have very similar config as @eacdy In
Configuration bean:
The Feign client:
|
After I added in the configuration in addition to the things above:
it worked for me. Just adding a |
Following all the steps in the comments above and it still doesn't log for me. in application.yml:
In FeignConfiguration.class:
@FeignClient(name = "organization-service", configuration = FeignConfiguration.class) (apologies for the formatting, I don't seem to be able to get the 'insert code' to work right) |
Triple backticks. What version? |
DALSTON.SR4 and spring boot 1.5.8. |
If you can provide a minimal sample project that recreates the problem and you think there is a bug, please submit a new issue. |
had to do following to work
|
Logging seems to still be broken in 2021. |
|
Based on the Spring Cloud documentation for Feign Logging, I can't seem to get the Feign logging to work.
Using an example from one of the @joshlong's great talks, I have the following Reservation Client with a Feign client called
com.example.ReservationReader
:And I've configured my Config Server to customize the logging level for the Feign Client with this full package name:
com.example.ReservationReader
. Here's an Httpie output showing the config is available to the Reservation Client:And I've restarted all of the services several times, so the Reservation Client should have the latest config.
Yet, when I execute a call to the Reservation Client such as:
GET http://localhost:9999/reservations/names
, nothing is written to the log. How does one properly enable logging of the Feign Client requests? Or is this a bug?The text was updated successfully, but these errors were encountered: