-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logging filter for Reactor Netty HTTP client
#deploy-proxy-yrkesskade Configured application.yml to set logging levels for Reactor Netty and Spring Cloud Gateway. Created a new LogFilter configuration class to add wiretap logging for HTTP client at INFO level.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...kesskade-proxy/src/main/java/no/nav/testnav/proxies/yrkesskadeproxy/config/LogFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package no.nav.testnav.proxies.yrkesskadeproxy.config; | ||
|
||
import io.netty.handler.logging.LogLevel; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import reactor.netty.http.client.HttpClient; | ||
import reactor.netty.transport.logging.AdvancedByteBufFormat; | ||
|
||
@Configuration | ||
public class LogFilter { | ||
|
||
@Bean | ||
HttpClient httpClient() { | ||
return HttpClient.create().wiretap("LoggingFilter", | ||
LogLevel.INFO, AdvancedByteBufFormat.TEXTUAL); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters