Spring log4j2 적용기
log4j vs logback vs log4j2 를 비교 해보고 log4j2를 사용해보기로 결정했다. Spring Framwork에 log4j2를 적용한 과정을 정리해본다. 의존 중복 처음에 log4j2 의존을 아래와 같이 추가해서 실행하니 에러가 발생했다. SLF4J가 여러 개 바인딩 되어서 발생한 문제였다. implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.6.3' Spring Boot에 로깅 모듈을 제외 시켜서 해결할 수 있다. implementation('org.springframework.boot:spring-boot-starter-data-jpa:2.6.2') { exclude module: "spring-boot-starter-logging" } 멀티 프로필 Spring Boot에서는 Logback처럼 프로필 별 xml 자동 감지가 안된다. properties 파일을 통해서 사용할 로깅 xml파일을 지정해줘야 된다....