조건
- profile에 따른 로깅 설정
- 로깅 레벨에 따른 로깅 설정(prod profile에서만)
Profile
- prod(aws ec2)
- file 기반
- ERROR level
- filename : error.log
- 나머지 level
- filename : yyyy-MM-dd_%i.rg.log (일자 별 rollingpolicy 적용)
- local, dev, test
- console 기반
설정 코드
logback-spring.xml
level logging 방식
- levelfilter
error level 로그에 대해서만 출력
- ThresholdFilter
error level, error level보다 높은 레벨의 로그에 대하여만 출력
→ 둘다 동작 x
테스트 결과 문제점
(file 로깅 테스트)
rg.log

레벨에 따른 로그 파일 분류가 이루어지지 않음..
error.log 생성 안 됨
++
rollingpolicy 설정 추가..