Skip to content

feat: add CommonsRequestLoggingFilter - #114

Open
gojung wants to merge 2 commits into
developfrom
add-client-logging
Open

feat: add CommonsRequestLoggingFilter#114
gojung wants to merge 2 commits into
developfrom
add-client-logging

Conversation

@gojung

@gojung gojung commented Jan 17, 2023

Copy link
Copy Markdown
Member

💁‍♂️ PR 내용

agent 출력을 위한 CommonsRequestLoggingFilter를 추가했습니다.
DEBUG 레벨로 출력합니다.

🙏 작업

  • WebMvcConfig에서 CommonsRequestLoggingFilter Bean 등록
  • application.yml에 '%d{yyyy-MM-dd HH:mm:ss.SSS, Asia/Seoul} %-10level [%L] [%.-24thread] %logger{50} %ex{30} - %msg%n' pattern으로 추가

🙈 PR 참고 사항

2023-01-17 15:02:53.924 DEBUG      [47] [http-nio-11113-exec-1] o.s.web.filter.CommonsRequestLoggingFilter  - Before request [GET /test, client=0:0:0:0:0:0:0:1, headers=[user-agent:"PostmanRuntime/7.29.2", accept:"*/*", postman-token:"5055c56b-7122-4058-8d37-1fa9beb3f484", host:"localhost:11113", accept-encoding:"gzip, deflate, br", connection:"keep-alive", cookie:"JSESSIONID=929B628935112FAFFE404F73AE11594E"]]
2023-01-17 15:02:53.957 DEBUG      [55] [http-nio-11113-exec-1] o.s.web.filter.CommonsRequestLoggingFilter  - After request [GET /test, client=0:0:0:0:0:0:0:1, headers=[user-agent:"PostmanRuntime/7.29.2", accept:"*/*", postman-token:"5055c56b-7122-4058-8d37-1fa9beb3f484", host:"localhost:11113", accept-encoding:"gzip, deflate, br", connection:"keep-alive", cookie:"JSESSIONID=929B628935112FAFFE404F73AE11594E"]]

@gojung
gojung requested a review from saint6839 January 17, 2023 06:11
@gojung gojung self-assigned this Jan 17, 2023
@junhaesung

Copy link
Copy Markdown
Member

tomcat access log 도 남고있는데, 로그를 새로 추가하신 이유가 있을까요?
그리고 에러로그와 accessLog 가 같이 남으면 보기 어려울거같은데, 별도의 파일로 분리해서 로그 남기는건 어떻게 생각하시나요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants