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

feat: 로그 출력용 AOP 구현 #430

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

feat: 로그 출력용 AOP 구현 #430

wants to merge 3 commits into from

Conversation

mikekks
Copy link
Member

@mikekks mikekks commented Sep 29, 2024

👩‍💻 Contents

  • 로그 출력용 AOP 구현했습니다.
  • 현재 버전은 실행되는 모든 메서드의 시작과 끝을 로깅하고 있습니다.
  • 로깅에 필요없거나 추가/수정 원하시는 부분있으면 편하게 말씀주세요!
스크린샷 2024-09-30 오전 1 18 28 스크린샷 2024-09-30 오전 1 18 39 스크린샷 2024-09-30 오전 1 18 50 스크린샷 2024-09-30 오전 1 19 00 스크린샷 2024-09-30 오전 1 19 10

배경

  • 처음에는 Aspect 를 사용해서 구현하려고 했습니다.
  • 하지만 메서드마다 어노테이션을 붙이는건 너무 번거롭다고 생각했습니다.
  • 그래서 클래스마다 어노테이션을 붙이는 방식으로 변경해봤습니다.
  • 하지만 클래스마다 어노테이션 붙이는 방식마저도 너무 번거롭다고 생각했습니다.
  • 그래서 전역적으로 실행시키는 방식으로 변경하고자 했습니다.
  • 그러다보니 결국 제가 예전에 구현했던 ExecutionLoggingAop 의 형태로 하는게 맞는거 같더라고요!
  • 그래서 현재 구현형태가 되었습니다!

📝 Review Note

  • 추가로 테스트 코드 돌릴때는 해당 AOP가 동작하지 않도록 설정했습니다. 이거에 대해서도 의견궁금합니다! 저는 단순히 굳이 필요하지 않은 것 같아서 그랬습니다!

📣 Related Issue

✅ 점검사항

  • docker-compose.yml 파일에 마이그레이션 한 API의 포워딩을 변경해줬나요?
  • Spring Secret 값을 수정하거나 추가했다면 Github Secret에서 수정을 해줬나요?
  • Nestjs Secret 값을 수정하거나 추가했다면 Docker-Compose.yml 파일 및 인스턴스 내부의 .env 파일을 수정했나요?

@mikekks mikekks added the 🎁 feature 새로운 기능 label Sep 29, 2024
@mikekks mikekks self-assigned this Sep 29, 2024
Copy link

height bot commented Sep 29, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

hoonyworld
hoonyworld previously approved these changes Sep 30, 2024
Copy link
Member

@hoonyworld hoonyworld left a comment

Choose a reason for hiding this comment

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

너무 좋은 기능인 것 같습니다!!

나중에 ERROR 로그 발생 시 slack으로 알림을 주는 기능도 구현하면 좋을 것 같네요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 feature 새로운 기능 size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: 로그 출력용 AOP 구현
2 participants