woowacourse-teams / 2020-seller-lee-company

🐳 조직 내에서 중고 거래를! 직고래
https://sites.google.com/woowahan.com/wooteco-demo/%EC%A7%81%EA%B3%A0%EB%9E%98
48 stars 12 forks source link

[로깅] 전반적인 로깅 적용 #440

Open jnsorn opened 3 years ago

jnsorn commented 3 years ago

상세 내용

jnsorn commented 3 years ago

logback -> log4j2 변경 중 에러 발생

2020-11-06 17:29:24,693 main ERROR Recursive call to appender Console_Appender

https://stackoverflow.com/questions/32366586/using-log4j2-with-slf4j-java-lang-stackoverflowerror

exclude 했으나 채팅 모듈의 logback과 충돌하는 것 같음

전체 모듈을 log4j2로 변경해야함

현재 상황

compile.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j'를 모든 모듈에 적용하니

Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.apache.logging.slf4j.Log4jLoggerFactory loaded from file:/Users/woowahan/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j-impl/2.13.3/7cca27a921a18645139cf651c04b83b1a19cfd76/log4j-slf4j-impl-2.13.3.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.apache.logging.slf4j.Log4jLoggerFactory