I have been trying to setup a proof of concept elasticsearch/kibana/logstash environment, but it is not working at the moment.
The LOGSTASH_HOME is:
c:\_work\issues\log4j_socketappender\logstash-5.0.1\
In the console log of logstash I found the following line:
Could not find log4j2 configuration at path /_work/issues/log4j_socketappender/logstash-5.0.1/config/log4j2.properties. Using default config which logs to console
You can see logstash is trying to look for log4j2.properties in the right location but it does not contain the "c:" part
I tried adding the path to the config\jvm.options
-Dlog4j.configurationFile=c:\_work\issues\log4j_socketappender\logstash-5.0.1\log4j2.properties
but it did not work.
解决方案
Eventually I fixed it by adding the following line into bin\setup.bat
42. SET JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configurationFile=%LS_HOME%\config\log4j2.properties