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

불필요한 정보 로깅 제외 및 원활한 스웨거 테스트를 위한 설정 #519

Merged
merged 5 commits into from
Sep 7, 2024

Conversation

Mingyum-Kim
Copy link
Contributor

PR의 목적이 무엇인가요?

  • 로깅에서 불필요한 정보가 조금 있어서 내용이 길어지고 파악하기 어려운 문제가 있었습니다. 불필요한 정보를 로깅에서 제외합니다.
  • 로깅을 로컬에서 테스트하기 위해 스웨거를 사용하였는데, 스웨거 테스트가 어려워서 원활한 테스트를 위해 몇 가지 설정을 추가하였습니다.

이슈 ID는 무엇인가요?

설명

로깅

image

기존 서버의 로깅의 문제점

  • 스레드 정보나 로거 파일 등 사용되지 않는 정보가 로깅됨
  • NULL인 Body나 Parameter, Member Id도 로깅됨

두 가지 부분을 제외하였어요!

image

현재는 요렇게 로깅 됩니다.

스웨거 테스트를 위한 설정

  • 더미 데이터 삽입 (일일이 다락방 부터 모임 참여까지 삽입하는 게 불편하더라고요. 😅)
  • 테스트용 토큰 발급을 위한 API 생성

질문 혹은 공유 사항 (Optional)

@Mingyum-Kim Mingyum-Kim added BE 백엔드 관련 이슈입니다. ⚒️ 리팩터링 refactor (기능이 변경되지는 않지만 코드를 수정) labels Sep 5, 2024
@Mingyum-Kim Mingyum-Kim self-assigned this Sep 5, 2024
Copy link
Contributor

@pricelees pricelees left a comment

Choose a reason for hiding this comment

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

고생 많았음👍👍 일단 이정도 반영만 해도 좋을것같아

Comment on lines 76 to 79
public LoginResponse basicLogin() {
Member member = memberRepository.findById(1L)
.orElse(new Member());
return new LoginResponse(jwtProvider.createToken(member));
Copy link
Contributor

Choose a reason for hiding this comment

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

1번 아이디로 멤버를 조회하면 개발(배포) 서버에서는 기존 DB에 저장된 회원이 불러와질수도 있는데, 차라리 아무거나 저장을 하고 불러오는건 어떤지요..?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아하 고렇게 하겠습니다 !!

Copy link
Contributor

@hoyeonyy hoyeonyy left a comment

Choose a reason for hiding this comment

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

안나는 신이야,,

@Mingyum-Kim Mingyum-Kim merged commit 47bd31f into develop-backend Sep 7, 2024
1 check passed
@Mingyum-Kim Mingyum-Kim deleted the refactor/#516 branch September 7, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 관련 이슈입니다. ⚒️ 리팩터링 refactor (기능이 변경되지는 않지만 코드를 수정)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants