문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
java:logback [2017/07/10 10:15] kwon37xi [기본 Fixed Window Rolling File Appender] |
java:logback [2023/09/21 13:21] (현재) kwon37xi |
||
|---|---|---|---|
| 줄 13: | 줄 13: | ||
| * logback-access : Tomcat/ | * logback-access : Tomcat/ | ||
| * [[http:// | * [[http:// | ||
| + | |||
| + | ===== LOGBACK-1591 취약점 이슈 ===== | ||
| + | * 가급적 logback **1.2.9** 이상 버전을 사용할 것. | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * 발생 가능성은 희박한 편임. | ||
| + | * [[https:// | ||
| + | * write access to logback.xml | ||
| + | * use of versions < 1.2.8 | ||
| + | * reloading of poisoned configuration data, which implies application restart or scan=" | ||
| ===== 설정 ===== | ===== 설정 ===== | ||
| 줄 101: | 줄 111: | ||
| </ | </ | ||
| - | ==== Multi line to Single line ==== | + | ===== Multi line to Single line ===== |
| Grep 시에 여러줄로 된 로그를 올바로 grep하기 힘들 경우 multi line 을 single line으로 합쳐서 로깅하면 좀 더 편하게 로깅 가능하다. | Grep 시에 여러줄로 된 로그를 올바로 grep하기 힘들 경우 multi line 을 single line으로 합쳐서 로깅하면 좀 더 편하게 로깅 가능하다. | ||
| [[http:// | [[http:// | ||
| - | Layout 을 다음과 같이 지정하면 된다. | + | Layout 을 다음과 같이 지정하면 |
| + | XML 설정의 경우에는 | ||
| < | < | ||
| %replace(%msg){" | %replace(%msg){" | ||
| </ | </ | ||
| + | |||
| + | < | ||
| + | -- 공백으로 변환됨. | ||
| + | %replace(%msg){' | ||
| + | </ | ||
| + | |||
| + | groovy 설정으로 할 경우에는 | ||
| + | < | ||
| + | %replace(%msg){" | ||
| + | </ | ||
| + | |||
| ===== Spring Framework ===== | ===== Spring Framework ===== | ||
| * [[https:// | * [[https:// | ||
| 줄 145: | 줄 167: | ||
| </ | </ | ||
| - | ====== Filter | + | ===== Filter ===== |
| * [[http:// | * [[http:// | ||
| - | ===== GEventEvaluator | + | ==== GEventEvaluator ==== |
| * '' | * '' | ||
| * '' | * '' | ||
| 줄 173: | 줄 195: | ||
| </ | </ | ||
| + | ===== Stacktrace 에서 불필요한 스택 감추기 ===== | ||
| + | <code xml> | ||
| + | < | ||
| + | < | ||
| + | 불필요한 stack 문자열 나열, | ||
| + | org.junit.platform.engine., | ||
| + | org.junit.platform.launcher., | ||
| + | org.junit.platform.commons.util.ReflectionUtils., | ||
| + | org.junit.jupiter.engine., | ||
| + | org.junit.jupiter.params.provider., | ||
| + | org.junit.jupiter.api.AssertThrows., | ||
| + | org.junit.jupiter.api.AssertDoesNotThrow., | ||
| + | org.assertj.core.api.AssertionsFor, | ||
| + | org.assertj.core.api.ThrowableAssert., | ||
| + | org.gradle. | ||
| + | "/> | ||
| + | |||
| + | < | ||
| + | value=" | ||
| + | |||
| + | </ | ||
| + | |||
| + | * 단점, '' | ||
| + | * Test 용 설정에 적용하면 좋음. | ||