IT 기술 관련/DevOps
[spring] netty 기반 access log 기록
spring boot 기반에서 내장 웹서버를 사용할때 보통 netty를 많이 사용한다. 이때 외부에서 들어오는 API 요청을 별도로 기록해 두면 디버깅할때 도움이 되기 때문에 로그를 활성화 시키는 것이 좋다. 문제는 netty의 로그를 활성화 시키려면 기동후 설정으로는 처리가 안되기 때문에 기동전에 설정이 되어야 하는데 이때 아래와 같이 처리하면 된다. @SpringBootApplication @EnableEurekaClient class ServerApplication fun main(args: Array) { System.setProperty("reactor.netty.http.server.accessLogEnabled", "true") runApplication(*args) } 추가로 기록되는 로그..
2023. 6. 26. 18:11