{"id":336180,"date":"2022-07-25T21:00:21","date_gmt":"2022-07-25T21:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336180"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336180","title":{"rendered":"<span>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043b\u043e\u0433\u0438 OpenFeign<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/607\/bf1\/7cf\/607bf17cf77bca375a0ff98fb9f8395f.png\" width=\"449\" height=\"164\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/607\/bf1\/7cf\/607bf17cf77bca375a0ff98fb9f8395f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/OpenFeign\/feign\/blob\/master\/core\/src\/main\/java\/feign\/Logger.java\" rel=\"noopener noreferrer nofollow\">\u043b\u043e\u0433\u0433\u0435\u0440 OpenFeign<\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439 \u2014 \u043e\u043d \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430, \u043f\u0440\u0438\u0447\u0451\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0442\u0435\u043b\u043e &#8212; \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043b\u043e\u0433\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2018Normalized Logger\u2019 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u0437\u044a\u044f\u043d &#8212; \u044d\u0442\u043e\u0442 \u043b\u043e\u0433\u0433\u0435\u0440 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043b\u043e\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0432\u0435\u0442 &#8212; \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u044b.<\/p>\n<h2>\u0421\u0442\u0430\u0440\u044b\u0439 \u043f\u043b\u043e\u0445\u043e\u0439 \u043b\u043e\u0433\u0433\u0435\u0440<\/h2>\n<pre><code>2022-07-25 14:12:43.572 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] ---> POST https:\/\/example.com\/api\/v1\/login HTTP\/1.1 2022-07-25 14:12:43.573 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] Content-Length: 23 2022-07-25 14:12:43.573 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] Content-Type: application\/json 2022-07-25 14:12:43.574 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] user-agent: Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4464.5 Safari\/537.36 2022-07-25 14:12:43.575 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login]  2022-07-25 14:12:43.576 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] {\"login\":\"123456789\"} 2022-07-25 14:12:43.576 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] ---> END HTTP (21-byte body) 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] &lt;--- UNKNOWN 200 (324ms) 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] cache-control: no-cache 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] cf-cache-status: DYNAMIC 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] cf-ray: 730476518ea441ce-AMS 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] content-type: application\/json 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] date: Mon, 25 Jul 2022 11:12:43 GMT 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] expect-ct: max-age=604800, report-uri=\"https:\/\/report-uri.cloudflare.com\/cdn-cgi\/beacon\/expect-ct\" 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] feature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment *; usb 'none' 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] referrer-policy: strict-origin-when-cross-origin 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] server: cloudflare 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] set-cookie: ACCESS_TOKEN=eyJh9uygCUMA659bAZ54SHpSNy_KFXQ; Max-Age=1800; Domain=.example.com; Path=\/; Secure; SameSite=None 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] strict-transport-security: max-age=31536000 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] x-content-type-options: nosniff 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] x-frame-options: sameorigin 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] x-xss-protection: 1; mode=block 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login]  2022-07-25 14:12:43.902 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] {\"status\":{\"code\":\"OK\",\"message\":\"OK\"},\"body\":{\"id\":\"20826\"}} 2022-07-25 14:12:43.902 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] &lt;--- END HTTP (61-byte body)<\/code><\/pre>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043b\u043e\u0433\u0433\u0435\u0440<\/h2>\n<pre><code>2022-07-25 14:16:06.217 INFO 1057053 --- [Executor] me.bvn13.openfeign.logger.NormalizedFeignLogger : normalized feign request {AuthApi#login(LoginRequestDto)=[AuthApi#login] }: [ ---> POST https:\/\/example.com\/api\/v1\/login HTTP\/1.1 Content-Length: 21 Content-Type: application\/json user-agent: Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4464.5 Safari\/537.36  {\"phone\":\"123456789\"} ---> END HTTP (21-byte body) ] has response [ &lt;--- UNKNOWN 200 (411ms) cache-control: no-cache cf-cache-status: DYNAMIC cf-ray: 73047b41ffd2fa4c-AMS content-type: application\/json date: Mon, 25 Jul 2022 11:16:06 GMT expect-ct: max-age=604800, report-uri=\"https:\/\/report-uri.cloudflare.com\/cdn-cgi\/beacon\/expect-ct\" feature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment *; usb 'none' referrer-policy: strict-origin-when-cross-origin server: cloudflare set-cookie: ACCESS_TOKEN=eyJhboft6rzD6Be16dXY5lgQNCzOZNFe4ra_NDIdmXlXi19hlvaQ; Max-Age=1800; Domain=.example.com; Path=\/; Secure; SameSite=None strict-transport-security: max-age=31536000 x-content-type-options: nosniff x-frame-options: sameorigin x-xss-protection: 1; mode=block  {\"status\":{\"code\":\"OK\",\"message\":\"OK\"},\"body\":{\"id\":\"20826\"}} &lt;--- END HTTP (61-byte body) ]<\/code><\/pre>\n<h2>\u041a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043b\u043e\u0433\u0433\u0435\u0440<\/h2>\n<p>1) \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<pre><code>&lt;dependency>     &lt;groupId>me.bvn13.openfeign.logger&lt;\/groupId>     &lt;artifactId>feign-normalized-logger&lt;\/artifactId>     &lt;version>0.1.3&lt;\/version> &lt;\/dependency><\/code><\/pre>\n<p>2) \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f FeignClient<\/p>\n<pre><code>import feign.Logger;  public class MyFeignConfig {          @Bean     public Logger logger() {         return new NormalizedFeignLogger();     }      }<\/code><\/pre>\n<p>3) \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0441\u0432\u043e\u0451\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<pre><code>@FeignClient(name = \"auth\", configuration = MyFeignConfig.class) public interface AuthApi { \/*...methods...*\/ }<\/code><\/pre>\n<p>4) \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c DEBUG \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f NormalizedFeignLogger<\/p>\n<p>\u0414\u043b\u044f Slf4J + Logback:<\/p>\n<pre><code>logging:   level:     me.bvn13.openfeign.logger.NormalizedFeignLogger: DEBUG<\/code><\/pre>\n<p>5) \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c FULL \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e FeignClient<\/p>\n<pre><code>feign:   client:     config:       auth:         logger-level: FULL<\/code><\/pre>\n<hr\/>\n<p>\u042d\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/blog.bvn13.me\/normalized-logger-for-openfeign-8727b4e5d776\" rel=\"noopener noreferrer nofollow\">https:\/\/blog.bvn13.me\/normalized-logger-for-openfeign-8727b4e5d776<\/a><\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043a\u043e\u0434\u0430 &#8212;\u00a0<a href=\"https:\/\/gitea.bvn13.me\/bvn13\/OpenFeign-NormalizedLogger\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/gitea.bvn13.me\/bvn13\/OpenFeign-NormalizedLogger<\/u><\/a><\/p>\n<p>Github \u043a\u043b\u043e\u043d &#8212; <a href=\"https:\/\/github.com\/bvn13\/OpenFeign-NormalizedLogger\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/bvn13\/OpenFeign-NormalizedLogger<\/u><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/678916\/\"> https:\/\/habr.com\/ru\/post\/678916\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/OpenFeign\/feign\/blob\/master\/core\/src\/main\/java\/feign\/Logger.java\" rel=\"noopener noreferrer nofollow\">\u043b\u043e\u0433\u0433\u0435\u0440 OpenFeign<\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439 \u2014 \u043e\u043d \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430, \u043f\u0440\u0438\u0447\u0451\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0442\u0435\u043b\u043e &#8212; \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043b\u043e\u0433\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2018Normalized Logger\u2019 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u0437\u044a\u044f\u043d &#8212; \u044d\u0442\u043e\u0442 \u043b\u043e\u0433\u0433\u0435\u0440 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043b\u043e\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0432\u0435\u0442 &#8212; \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u044b.<\/p>\n<h2>\u0421\u0442\u0430\u0440\u044b\u0439 \u043f\u043b\u043e\u0445\u043e\u0439 \u043b\u043e\u0433\u0433\u0435\u0440<\/h2>\n<pre><code>2022-07-25 14:12:43.572 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] ---> POST https:\/\/example.com\/api\/v1\/login HTTP\/1.1 2022-07-25 14:12:43.573 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] Content-Length: 23 2022-07-25 14:12:43.573 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] Content-Type: application\/json 2022-07-25 14:12:43.574 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] user-agent: Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4464.5 Safari\/537.36 2022-07-25 14:12:43.575 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login]  2022-07-25 14:12:43.576 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] {\"login\":\"123456789\"} 2022-07-25 14:12:43.576 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] ---> END HTTP (21-byte body) 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] &lt;--- UNKNOWN 200 (324ms) 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] cache-control: no-cache 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] cf-cache-status: DYNAMIC 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] cf-ray: 730476518ea441ce-AMS 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] content-type: application\/json 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] date: Mon, 25 Jul 2022 11:12:43 GMT 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] expect-ct: max-age=604800, report-uri=\"https:\/\/report-uri.cloudflare.com\/cdn-cgi\/beacon\/expect-ct\" 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] feature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment *; usb 'none' 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] referrer-policy: strict-origin-when-cross-origin 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] server: cloudflare 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] set-cookie: ACCESS_TOKEN=eyJh9uygCUMA659bAZ54SHpSNy_KFXQ; Max-Age=1800; Domain=.example.com; Path=\/; Secure; SameSite=None 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] strict-transport-security: max-age=31536000 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] x-content-type-options: nosniff 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] x-frame-options: sameorigin 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] x-xss-protection: 1; mode=block 2022-07-25 14:12:43.901 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login]  2022-07-25 14:12:43.902 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] {\"status\":{\"code\":\"OK\",\"message\":\"OK\"},\"body\":{\"id\":\"20826\"}} 2022-07-25 14:12:43.902 DEBUG 1032530 --- [Executor] feign.Logger : [AuthApi#login] &lt;--- END HTTP (61-byte body)<\/code><\/pre>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043b\u043e\u0433\u0433\u0435\u0440<\/h2>\n<pre><code>2022-07-25 14:16:06.217 INFO 1057053 --- [Executor] me.bvn13.openfeign.logger.NormalizedFeignLogger : normalized feign request {AuthApi#login(LoginRequestDto)=[AuthApi#login] }: [ ---> POST https:\/\/example.com\/api\/v1\/login HTTP\/1.1 Content-Length: 21 Content-Type: application\/json user-agent: Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4464.5 Safari\/537.36  {\"phone\":\"123456789\"} ---> END HTTP (21-byte body) ] has response [ &lt;--- UNKNOWN 200 (411ms) cache-control: no-cache cf-cache-status: DYNAMIC cf-ray: 73047b41ffd2fa4c-AMS content-type: application\/json date: Mon, 25 Jul 2022 11:16:06 GMT expect-ct: max-age=604800, report-uri=\"https:\/\/report-uri.cloudflare.com\/cdn-cgi\/beacon\/expect-ct\" feature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment *; usb 'none' referrer-policy: strict-origin-when-cross-origin server: cloudflare set-cookie: ACCESS_TOKEN=eyJhboft6rzD6Be16dXY5lgQNCzOZNFe4ra_NDIdmXlXi19hlvaQ; Max-Age=1800; Domain=.example.com; Path=\/; Secure; SameSite=None strict-transport-security: max-age=31536000 x-content-type-options: nosniff x-frame-options: sameorigin x-xss-protection: 1; mode=block  {\"status\":{\"code\":\"OK\",\"message\":\"OK\"},\"body\":{\"id\":\"20826\"}} &lt;--- END HTTP (61-byte body) ]<\/code><\/pre>\n<h2>\u041a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043b\u043e\u0433\u0433\u0435\u0440<\/h2>\n<p>1) \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<pre><code>&lt;dependency>     &lt;groupId>me.bvn13.openfeign.logger&lt;\/groupId>     &lt;artifactId>feign-normalized-logger&lt;\/artifactId>     &lt;version>0.1.3&lt;\/version> &lt;\/dependency><\/code><\/pre>\n<p>2) \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f FeignClient<\/p>\n<pre><code>import feign.Logger;  public class MyFeignConfig {          @Bean     public Logger logger() {         return new NormalizedFeignLogger();     }      }<\/code><\/pre>\n<p>3) \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0441\u0432\u043e\u0451\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<pre><code>@FeignClient(name = \"auth\", configuration = MyFeignConfig.class) public interface AuthApi { \/*...methods...*\/ }<\/code><\/pre>\n<p>4) \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c DEBUG \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f NormalizedFeignLogger<\/p>\n<p>\u0414\u043b\u044f Slf4J + Logback:<\/p>\n<pre><code>logging:   level:     me.bvn13.openfeign.logger.NormalizedFeignLogger: DEBUG<\/code><\/pre>\n<p>5) \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c FULL \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e FeignClient<\/p>\n<pre><code>feign:   client:     config:       auth:         logger-level: FULL<\/code><\/pre>\n<hr\/>\n<p>\u042d\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/blog.bvn13.me\/normalized-logger-for-openfeign-8727b4e5d776\" rel=\"noopener noreferrer nofollow\">https:\/\/blog.bvn13.me\/normalized-logger-for-openfeign-8727b4e5d776<\/a><\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043a\u043e\u0434\u0430 &#8212;\u00a0<a href=\"https:\/\/gitea.bvn13.me\/bvn13\/OpenFeign-NormalizedLogger\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/gitea.bvn13.me\/bvn13\/OpenFeign-NormalizedLogger<\/u><\/a><\/p>\n<p>Github \u043a\u043b\u043e\u043d &#8212; <a href=\"https:\/\/github.com\/bvn13\/OpenFeign-NormalizedLogger\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/bvn13\/OpenFeign-NormalizedLogger<\/u><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/678916\/\"> https:\/\/habr.com\/ru\/post\/678916\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-336180","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336180"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336180\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}