Skip to content

Commit

Permalink
Deploy : logging test
Browse files Browse the repository at this point in the history
  • Loading branch information
404-not-foundl committed Mar 28, 2024
1 parent d1eff6c commit 52cefb6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package S10P22D204.authentication.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.server.WebFilter;

@Configuration
public class WebFluxLoggingConfig {

@Bean
public WebFilter loggingFilter() {
return (exchange, chain) -> {
// 요청 로깅
System.out.println("Request: " + exchange.getRequest().getURI());

return chain.filter(exchange).doOnEach(signal -> {
// 응답 로깅
if (!signal.isOnComplete()) {
System.out.println("Response: " + signal.get());
}
});
};
}
}
12 changes: 11 additions & 1 deletion src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ spring:
enabled: true
backend: spring
default-context: application
uri: http://j10d204.p.ssafy.io:8200
uri: http://j10d204.p.ssafy.io:8200

logging:
level:
org:
springframework:
web: DEBUG # Spring WebFlux의 디버그 로그 활성화
reactor:
netty: DEBUG # Reactor Netty의 디버그 로그 활성화
S10P22D204:
authentication: DEBUG

0 comments on commit 52cefb6

Please sign in to comment.