Hi, I'm using elasticsearch 2.3 embedded in my Java program and I want to log generate logs similar to how the standalone elasticsearch does logging. Can you please point me in the right direction ?
I've tried this so far.
Settings elasticsearchSettings = Settings.settingsBuilder()
.put("path.conf", "elasticsearch/conf")
.put("node.name", "chin chao")
.put("path.home", "elasticsearch")
.put("path.data", "elasticsearch/data")
.put("path.logs", "elasticsearch/logs")
.put("cluster.name", "elasticsearch")
.build();
LogConfigurator.configure(elasticsearchSettings, true);
But I am getting following error since I am using log4j2 in my program.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator