Logstash log4j.properties config

information:
logstash version:5.2.2
system information : windows 64 bit
demand:
Implement the logstash self log to print to the file
operation process:
cmd command:logstash -f E:\cs\conf --path.settings /e:/logstash-5.2.2/config -r
problem:
2018-05-04 15:17:19,235 main DEBUG LoggerContext[name=66d33a, org.apache.logging
.log4j.core.LoggerContext@7e5d3699] started OK with configuration org.apache.log
ging.log4j.core.config.properties.PropertiesConfiguration@2ac9e172.
org/logstash/log/LogstashMessageFactory.java:28:in newMessage': java.lang.NoCla ssDefFoundError: org/logstash/log/StructuredMessage from org/apache/logging/log4j/spi/MessageFactory2Adapter.java:49:innew
Message'
from org/apache/logging/log4j/spi/AbstractLogger.java:2004:in logMessag e' from org/apache/logging/log4j/spi/AbstractLogger.java:1876:inlogIfEnab
led'
from org/apache/logging/log4j/spi/AbstractLogger.java:849:in error' from java/lang/reflect/Method.java:498:ininvoke'
from E:/cs/logstash-5.2.2/logstash-core/lib/logstash/logging/logger.rb:5
6:in error' from E:/cs/logstash-5.2.2/logstash-core/lib/logstash/agent.rb:260:inin
crement_reload_failures_metrics'
from E:/cs/logstash-5.2.2/logstash-core/lib/logstash/agent.rb:277:in cr eate_pipeline' from E:/cs/logstash-5.2.2/logstash-core/lib/logstash/agent.rb:95:inreg
ister_pipeline'
from E:/cs/logstash-5.2.2/logstash-core/lib/logstash/runner.rb:264:in e xecute' from E:/cs/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/c lamp/command.rb:67:inrun'
from E:/cs/logstash-5.2.2/logstash-core/lib/logstash/runner.rb:183:in r un' from E:/cs/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/c lamp/command.rb:132:inrun'
from E:\cs\logstash-5.2.2\lib\bootstrap\environment.rb:71:in (root)' from E_3a_/cs/logstash_minus_5_dot_2_dot_2/lib/bootstrap/E:\cs\logstash- 5.2.2\lib\bootstrap\environment.rb:71:in(root)'
Caused by:
URLClassLoader.java:381:in findClass': java.lang.ClassNotFoundException: org.lo gstash.log.StructuredMessage from JRubyClassLoader.java:221:infindClass'
from ClassLoader.java:424:in loadClass' from ClassLoader.java:357:inloadClass'
from LogstashMessageFactory.java:28:in newMessage' from MessageFactory2Adapter.java:49:innewMessage'
from AbstractLogger.java:2004:in logMessage' from AbstractLogger.java:1876:inlogIfEnabled'
from AbstractLogger.java:849:in error' from NativeMethodAccessorImpl.java:-2:ininvoke0'
from NativeMethodAccessorImpl.java:62:in invoke' from DelegatingMethodAccessorImpl.java:43:ininvoke'
from Method.java:498:in invoke' from JavaMethod.java:421:ininvokeDirectWithExceptionHandling'
from JavaMethod.java:288:in invokeDirect' from InstanceMethodInvoker.java:27:incall'
from InstanceMethodInvoker.java:50:in call' from CachingCallSite.java:346:incacheAndCall'
from CachingCallSite.java:204:in call' from CallTwoArgNode.java:59:ininterpret'
from NewlineNode.java:105:in interpret' from ASTInterpreter.java:74:inINTERPRET_METHOD'
from InterpretedMethod.java:225:in call' from DefaultMethod.java:219:incall'
from CachingCallSite.java:346:in cacheAndCall' from CachingCallSite.java:204:incall'
from CallTwoArgNode.java:59:in interpret' from NewlineNode.java:105:ininterpret'
from IfNode.java:118:in interpret' from NewlineNode.java:105:ininterpret'
from BlockNode.java:71:in interpret' from ASTInterpreter.java:74:inINTERPRET_METHOD'
from InterpretedMethod.java:268:in call' from DefaultMethod.java:235:incall'
from CachingCallSite.java:366:in cacheAndCall' from CachingCallSite.java:238:incall'
from FCallThreeArgNode.java:40:in interpret' from NewlineNode.java:105:ininterpret'
from BlockNode.java:71:in interpret' from BlockNode.java:71:ininterpret'
from RescueBodyNode.java:108:in interpret' from RescueNode.java:174:inhandleException'
from RescueNode.java:120:in interpret' from BeginNode.java:83:ininterpret'
from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret'
from ASTInterpreter.java:74:in INTERPRET_METHOD' from InterpretedMethod.java:182:incall'
from DefaultMethod.java:203:in call' from CachingCallSite.java:326:incacheAndCall'
from CachingCallSite.java:170:in call' from FCallOneArgNode.java:36:ininterpret'
from LocalAsgnNode.java:123:in interpret' from NewlineNode.java:105:ininterpret'
from BlockNode.java:71:in interpret' from ASTInterpreter.java:74:inINTERPRET_METHOD'
from InterpretedMethod.java:225:in call' from DefaultMethod.java:219:incall'
from CachingCallSite.java:346:in cacheAndCall' from CachingCallSite.java:204:incall'
from CallTwoArgNode.java:59:in interpret' from NewlineNode.java:105:ininterpret'
from BlockNode.java:71:in interpret' from RescueNode.java:221:inexecuteBody'
from RescueNode.java:116:in interpret' from EnsureNode.java:96:ininterpret'
from ASTInterpreter.java:74:in INTERPRET_METHOD' from InterpretedMethod.java:139:incall'
from DefaultMethod.java:187:in call' from CachingCallSite.java:306:incacheAndCall'
from CachingCallSite.java:136:in call' from VCallNode.java:88:ininterpret'
from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret'
from ASTInterpreter.java:74:in INTERPRET_METHOD' from InterpretedMethod.java:204:incall'
from DefaultMethod.java:211:in call' from SuperCallSite.java:366:incacheAndCall'
from SuperCallSite.java:192:in callBlock' from SuperCallSite.java:197:incall'
from SuperCallSite.java:108:in callVarargs' from SuperNode.java:115:ininterpret'
from NewlineNode.java:105:in interpret' from BlockNode.java:71:ininterpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'

Anyone answers,tks!!!

which java version?

jdk 1.8

see this with java
https://www.elastic.co/support/matrix#matrix_jvm

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.