티스토리 뷰

공부

[logback] rollingPolicy

승가비 2023. 9. 16. 21:58
728x90
logging:
  level:
    org.springframework.security: DEBUG
    org.springframework.web: DEBUG
    org.springframework.transaction.interceptor: TRACE
    org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor: WARN
  pattern:
    level: "[userId=%X{userId}, reqId=%X{requestId}] %5p"
  file:
    path: logs
  logback:
    rollingpolicy:
      file-name-pattern: ${LOG_FILE}.%d{yyyy-MM-dd-HH}.%i.gz
      max-file-size: 100MB
      max-history: 168
      totalSizeCap: 100GB

24h * 7d = 168

 

https://reference-m1.tistory.com/349

 

[Back end] logback 시간, 용량 Rolling 적용

logback.qos.ch/manual/appenders.html Chapter 4: Appenders Chapter 4: Appenders 和訳 (Japanese translation) There is so much to tell about the Western country in that day that it is hard to know where to start. One thing sets off a hundred others. The pro

reference-m1.tistory.com

https://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy

 

Chapter 4: Appenders

There is so much to tell about the Western country in that day that it is hard to know where to start. One thing sets off a hundred others. The problem is to decide which one to tell first. —JOHN STEINBECK, East of Eden Chapter 4: Appenders What is an Ap

logback.qos.ch

https://kimpaper.github.io/2015/10/30/logback-config/

 

logback에서 시간 + 용량 기준으로 로그파일 분할하기

logback을 이용하는 경우 오늘이 지나거나 용량이 100메가를 넘어가면 파일이 분리된다. logback.xml 에 아래 appender 추가 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <appender name="debug" class="ch.qos.logback.core.rolling.Rol

kimpaper.github.io

https://howow.tistory.com/9

 

[Spring][logback] 로그파일 분할 시 totalSizeCap 속성 사용 주의사항

totalSizeCap 속성은 maxHistory 속성에 종속되어 있다. totalSizeCap 속성은 maxHistory 속성 설정 시에만 동작한다. 정상 (totalSizeCap 기능 동작 O) ${LOG_PATH}${TEST_LOG_HTML} ${LOG_PATH}${TEST_ARCHIVE_LOG_HTML} 10MB 60 20GB true

howow.tistory.com

 

728x90
댓글