Rest client logging in spring boot

less than 1 minute read

Feign client

A logger is created for each Feign client created. By default the name of the logger is the full class name of the interface used to create the Feign client. Feign logging only responds to the DEBUG level.


logging.level.project.user.UserClient: DEBUG The Logger.Level object that you may configure per client, tells Feign how much to log. Choices are:

NONE, No logging (DEFAULT).

  • BASIC, Log only the request method and URL and the response status code and execution time.
  • HEADERS, Log the basic information along with request and response headers.
  • FULL, Log the headers, body, and metadata for both requests and responses. For example, the following would set the Logger.Level to FULL:
public class FooConfiguration {
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;

Question: Need to understand if this configuration works with log4j2 configuration.

REST Template

Best for debugging (header wire + context logging)


Enable full wire (header and content) + context logging