Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

스프링단 로그 추가 #245

Merged
merged 5 commits into from
Aug 5, 2024
Merged

Conversation

jminkkk
Copy link
Contributor

@jminkkk jminkkk commented Aug 2, 2024

⚡️ 관련 이슈

close #207

📍주요 변경 사항

  1. ExceptionHandler 발생 에러 로깅
  2. 요청 쓰레드 구분을 위한 MDC 필터 생성
  3. 메서드 이름 및 실행 시간 측정을 위한 Aspect 생성
  4. 요청 및 응답 로깅용 필터 추가

@jminkkk jminkkk added feature 기능 추가 BE 백엔드 labels Aug 2, 2024
@jminkkk jminkkk added this to the 3차 스프린트 🐤 milestone Aug 2, 2024
@jminkkk jminkkk self-assigned this Aug 2, 2024
Copy link
Contributor

@kyum-q kyum-q left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

몰리 멋져용 ~

Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혼자 로깅 작업하느라 고생 많았어요!

@RestControllerAdvice
public class GlobalExceptionHandler {

@ExceptionHandler
public ResponseEntity<ProblemDetail> handleCodeZapException(CodeZapException codeZapException) {
log.info("[CodeZapException] {}가 발생했습니다.", codeZapException.getClass().getName(), codeZapException);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우리가 충분히 예상하고, 예외 처리를 해 준 상황이 INFO 레벨의 로그에 기록되는 것이 조금은 어색하게 느껴져요.
혹시 아직 로그 레벨에 대한 논의가 진행되지 않았다면, 같이 이야기를 해 보아도 좋을 것 같아요!
꼭 수정해야 하는 것은 아니기에 우선 comment 만 남겨두고 Approve 할게요

Copy link
Contributor Author

@jminkkk jminkkk Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

예상했기 때문에 ERROR나 WARN가 아닌 INFO로 설정해두긴 했었어요...!
크리티컬하지는 않지만 사용자에게 400대 응답이 간 것이기 때문에 정보로 남길 필요가 있다고 생각했기 때문에요~

혹시 짱수는 400대 에러에는 어느 레벨이 적절한지 생각하는지 궁금해요!
+) 디스커션으로 얘기 해보면 좋을 것 같아요!

Copy link
Contributor

@HoeSeong123 HoeSeong123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다.
코멘트를 달아두신 분들이 있어서 approve만 해놓겠습니다.
코멘트 확인하시고 merge 부탁드립니다~

@jminkkk jminkkk merged commit 0f82252 into woowacourse-teams:dev/be Aug 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 feature 기능 추가
Projects
Status: Weekend Done
Development

Successfully merging this pull request may close these issues.

5 participants