[CHORE] 서버 로그 JSON 파일 기록 및 조회 및 디스코드 알림 추가#54
Merged
Conversation
- logback-spring.xml로 일 단위 JSON 롤링 파일 로깅 구성 (logstash-logback-encoder) - ERROR 로그를 디스코드 웹훅으로 실시간 전송하는 비동기 appender 추가 (분당 제한 포함) - /internal/logs 내부 엔드포인트로 SSH 없이 로그 조회 (기존 내부 API 키로 보호) IssueNum #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
데모 행사 중 발생하는 오류를 SSH 접속 없이 기록·확인하기 위한 로깅 기능을 추가했습니다.
logback-spring.xml로 일 단위 롤링 JSON 로그 저장 (logs/app.json→app.YYYY-MM-DD.json, 7일 보관,logstash-logback-encoder)ERROR로그를 디스코드 웹훅으로 실시간 전송. URL 미설정 시 no-op, 분당 호출 제한, 비동기 처리로 요청 스레드 비차단GET /internal/logs(목록),GET /internal/logs/{date}?level=ERROR&lines=N(조회). 기존InternalApiKeyFilter로 자동 보호되어X-Internal-Api-Key헤더로 IntelliJ HTTP Client/브라우저에서 조회 가능배포 전 필요한 env
DISCORD_WEBHOOK_URL: 디스코드 채널 웹훅 URL (compose backend env에 주입)LOG_DIR: 선택, 기본logsINTERNAL_API_KEY: 기존 값 재사용연관 이슈 및 Close 할 이슈 작성
close #53
Pull Request 체크리스트
TODO