elasticsearch client 라이브러를 실행 도중에 다음 에러가 발생했다.



ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.



해결 방법은 다음 URL에 있다. 


https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/_log4j_2_logger.html


다음을 pom파일에 추가하고 


<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.9.1</version>
</dependency>



src/main/resource 디렉토리에 log4j2.properties을 추가한다.


appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout

rootLogger.level = info
rootLogger.appenderRef.console.ref = console


Posted by '김용환'
,