[SpringBoot] Log4j2 기본 사용법

[Logging] SLF4J란?

Log4j2

아래 dependency의 기본 로그는 logback

implementation 'org.springframework.boot:spring-boot-starter-web'

logback 종속성 제거

configurations {
    all {
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
    }
}

log4j2 종속성 추가

implementation 'org.springframework.boot:spring-boot-starter-log4j2'

SLF4J

Untitled