Skip to content

Conversation

@jhan0121
Copy link
Owner

🚀 작업 내용

배포 사전 작업 중 하나인 로그 기능을 추가합니다.

📸 이슈 번호

✍ 궁금한 점

  • 시스템 로그와 비즈니스 로그를 효과적으로 분리해서 관리할 수 없을까?

@jhan0121 jhan0121 added this to the v1.0.0 milestone Dec 31, 2025
@jhan0121 jhan0121 requested a review from Copilot December 31, 2025 11:03
@jhan0121 jhan0121 self-assigned this Dec 31, 2025
@jhan0121 jhan0121 added BE Backend ✨ feat 기능 추가 labels Dec 31, 2025
@github-actions
Copy link

github-actions bot commented Dec 31, 2025

🧪 테스트 커버리지 리포트

Overall Project 98.28% 🍏
Files changed 100% 🍏

File Coverage
MemberController.java 100% 🍏
NotificationHistoryService.java 100% 🍏
ReviewService.java 100% 🍏
EmailSender.java 100% 🍏
ReviewEmailSender.java 100% 🍏
DeviceAuthEmailSender.java 100% 🍏
Email.java 100% 🍏
MemberService.java 92% 🍏

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements comprehensive logging functionality across the application, including structured logging with MDC (Mapped Diagnostic Context) for request tracing, log file rotation, and business event logging across services.

Key Changes:

  • Added Logback configuration with console and file appenders, including log rotation and profile-based logging
  • Implemented request/response logging infrastructure using Filter and AOP for automatic API tracking
  • Added business event logging throughout service and email sender classes with tagged log messages

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/main/resources/logback-spring.xml Configures Logback with console/file appenders, rotation policy, and profile-specific settings
src/main/java/com/recyclestudy/common/log/MDCKey.java Defines MDC keys for distributed tracing context (traceId, IP, URI, etc.)
src/main/java/com/recyclestudy/common/log/ApiLogFilter.java Implements servlet filter for HTTP request/response logging with MDC population
src/main/java/com/recyclestudy/common/log/ControllerLoggingAspect.java Adds AOP-based controller method logging with arguments and response tracking
src/main/java/com/recyclestudy/review/service/ReviewService.java Adds business event logs for review and review cycle save operations
src/main/java/com/recyclestudy/review/service/NotificationHistoryService.java Adds logging for notification history status updates
src/main/java/com/recyclestudy/member/service/MemberService.java Adds logging for device and member operations (save, auth, delete)
src/main/java/com/recyclestudy/exception/GlobalControllerAdvice.java Adds exception logging to all exception handlers
src/main/java/com/recyclestudy/email/ReviewEmailSender.java Updates review email logs with structured format and error logging
src/main/java/com/recyclestudy/email/EmailSender.java Updates email sender logs with tagged format
src/main/java/com/recyclestudy/email/DeviceAuthEmailSender.java Updates authentication email logs with tagged format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jhan0121 jhan0121 merged commit 5e3cc60 into be/dev Dec 31, 2025
1 check passed
@jhan0121 jhan0121 deleted the be/feat/logging branch December 31, 2025 11:57
jhan0121 added a commit that referenced this pull request Jan 2, 2026
* feat: 로그 기능 추가

* chore: 신규 유저 이메일 등록 시작 로그 태그명 수정

* feat: 이메일 마스킹 기능 적용

* refactor: 복습 주기 저장 로그 포맷 수정

* refactor: 이메일 전송 기능 도메인 객체 파라미터로 변경
jhan0121 added a commit that referenced this pull request Jan 2, 2026
* feat: flyway 기반 db 마이그레이션 의존성 추가

- 환경별 jpa sql 출력 여부 분리

* fix: ReviewCycle#scheduledAt not null 누락 수정

* test: 테스트 환경에서 flyway 비활성화

* 로그 기능 추가 (#21)

* feat: 로그 기능 추가

* chore: 신규 유저 이메일 등록 시작 로그 태그명 수정

* feat: 이메일 마스킹 기능 적용

* refactor: 복습 주기 저장 로그 포맷 수정

* refactor: 이메일 전송 기능 도메인 객체 파라미터로 변경

* test: MemberServiceTest#authenticateDevice 테스트 커버리지 보완 (#22)
jhan0121 added a commit that referenced this pull request Jan 3, 2026
* init: 프로젝트 초기 설정 추가

* 이메일 기반 멀티 디바이스 인증 및 관리 기능 구현 (#3)

* build: JPA 의존성 추가

* feat: BaseEntity 추가

* feat: NullValidator 추가

* feat: docker compose 파일 추가

* feat: Email 추가

* feat: DeviceIdentifier 추가

* test: BaseEntity equals 검증 테스트 추가

* feat: Member 추가

* feat: Device 추가

* style: 불필요한 개행 제거

* feat: DeviceIdentifier 추가

* feat: email에 toString 추가

* feat: Device 정적 팩터리 메서드 구조 수정

- isActive 추가

* feat: RecyclestudyApplication에 비동기 설정 추가

* feat: 이메일 전송 기능을 위한 의존성 추가

* feat: 전역 예외 처리용 ControllerAdvice 추가

* feat: EmailService  추가

* feat: IdentifierCreator 추가

* feat: 멤버 저장 기능 추가

- 멤버 저장
- 디바이스 id 발급

* feat: 멤버의 디바이스 전체 조회 기능 추가

* feat: 디바이스 이메일 인증 메일 발송 기능 추가

* feat: 이메일 인증 기능 추가

* test: MemberServiceTest 불필요한 검증 로직 제거

* feat: GlobalControllerAdvice 예외 처리 로직 추가

* test: MemberControllerTest 추가

* test: DeviceControllerTest 추가

* chore: DeviceControllerTest 패키지 위치 수정

* refactor: Member 이메일 유니크 제약 조건 설정

* refactor: Device 내 Member에 JoinColumn 추가

* refactor: Device identifier 유니크 제약 조건 설정

* refactor: DeviceController 패키지 위치 수정 및 파라미터명 변경

* feat: ActivationExpiredDateTime 추가

* refactor: EmailService 구조 개선

- 로그 추가
- 메서드 분리

* feat: Member 이메일 검증 기능 추가

* feat: Device 소유 검증 기능 추가

* feat: GlobalControllerAdvice  내 DeviceActivationExpiredException 처리 추가

* refactor: 이메일 인증 제한 시간 로직 추가

* jacoco 기반 테스트 커버리지 CI 구축 (#6)

* feat: jacoco 기반 테스트 커버리지 CI 스크립트 추자

* test: 테스트 환경 DB H2 사용하도록 변경

* 디바이스 삭제 기능 추가 (#7)

* feat: 디바이스 삭제 기능 추가

* chore: final 키워드 누락 수정

* fix: 대상 디바이스를 제거하도록 기능 수정

* 등록한 디바이스 조회 기능 응답 형식 수정 (#9)

* fix: 등록한 디바이스 조회 기능 응답 형식 수정

* chore: 실행 sql 로그 출력 기능 활성화

* 복습할 URL 저장 기능 추가 (#10)

* feat: 리뷰 대상 url 저장 기능 추가

* fix: ReviewService 트랜잭션 누락 수정

* swagger 기반 API 문서 작성 (#12)

* feat: swagger 기반 api 문서 기능 추가

* refactor: 불필요한 로그 출력 제거

* refactor: 누락된 타입 명시 로직 추가

* CI 대상 branch 설정 추가 (#13)

* 복습 대상 URL 이메일 전송 스케줄러 구현 (#19)

* feat: Review 엔티티에 Member 연관 관계 추가

* feat: 주기적 복습 이메일 전송 기능 추가

- 공통 이메일 전송 기능 별도 분리 리팩터링 진행

* test: ReviewCycleServiceTest 추가

* refactor: ReviewSendOutput collect 내 불변 리스트를 사용하도록 수정

* refactor: html 태그에 lang 추가

* feat: 이메일 전송 이력 관리 기능 추가

* style: 코드 구조 정리

* refactor: ReviewEmailSender 타임존 설정 추가

* test: 메일 발송 실패 처리 검증 추가

* 로그 기능 추가 (#21)

* feat: 로그 기능 추가

* chore: 신규 유저 이메일 등록 시작 로그 태그명 수정

* feat: 이메일 마스킹 기능 적용

* refactor: 복습 주기 저장 로그 포맷 수정

* refactor: 이메일 전송 기능 도메인 객체 파라미터로 변경

* test: MemberServiceTest#authenticateDevice 테스트 커버리지 보완 (#22)

* flyway 기반 db 마이그레이션 의존성 추가 (#24)

* feat: flyway 기반 db 마이그레이션 의존성 추가

- 환경별 jpa sql 출력 여부 분리

* fix: ReviewCycle#scheduledAt not null 누락 수정

* test: 테스트 환경에서 flyway 비활성화

* 로그 기능 추가 (#21)

* feat: 로그 기능 추가

* chore: 신규 유저 이메일 등록 시작 로그 태그명 수정

* feat: 이메일 마스킹 기능 적용

* refactor: 복습 주기 저장 로그 포맷 수정

* refactor: 이메일 전송 기능 도메인 객체 파라미터로 변경

* test: MemberServiceTest#authenticateDevice 테스트 커버리지 보완 (#22)

* 배포 스크립트 추가 (#31)

* feat: 배포 스크립트 추가

* refactor: docker-compose.yaml env 설정 수정

* chore: 태그 검증 로그 메시지 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BE Backend ✨ feat 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants