# Logstash log4j.properties config

**URL:** https://discuss.elastic.co/t/logstash-log4j-properties-config/130573
**Category:** Logstash
**Created:** [May 4, 2018, 7:28am UTC](https://discuss.elastic.co/t/logstash-log4j-properties-config/130573 "2018-05-04T07:28:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![z377023694](https://avatars.discourse-cdn.com/v4/letter/z/87869e/32.png) [@z377023694](https://discuss.elastic.co/u/z377023694)
#### Post date: [May 4, 2018, 7:28am UTC](https://discuss.elastic.co/t/logstash-log4j-properties-config/130573/1 "2018-05-04T07:28:00Z")

</div>

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:in`new  
Message'  
from org/apache/logging/log4j/spi/AbstractLogger.java:2004:in `logMessag e' from org/apache/logging/log4j/spi/AbstractLogger.java:1876:in`logIfEnab  
led'  
from org/apache/logging/log4j/spi/AbstractLogger.java:849:in `error' from java/lang/reflect/Method.java:498:in`invoke'  
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:in`in  
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:in`reg  
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:in`run'  
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:in`run'  
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:in`findClass'  
from ClassLoader.java:424:in `loadClass' from ClassLoader.java:357:in`loadClass'  
from LogstashMessageFactory.java:28:in `newMessage' from MessageFactory2Adapter.java:49:in`newMessage'  
from AbstractLogger.java:2004:in `logMessage' from AbstractLogger.java:1876:in`logIfEnabled'  
from AbstractLogger.java:849:in `error' from NativeMethodAccessorImpl.java:-2:in`invoke0'  
from NativeMethodAccessorImpl.java:62:in `invoke' from DelegatingMethodAccessorImpl.java:43:in`invoke'  
from Method.java:498:in `invoke' from JavaMethod.java:421:in`invokeDirectWithExceptionHandling'  
from JavaMethod.java:288:in `invokeDirect' from InstanceMethodInvoker.java:27:in`call'  
from InstanceMethodInvoker.java:50:in `call' from CachingCallSite.java:346:in`cacheAndCall'  
from CachingCallSite.java:204:in `call' from CallTwoArgNode.java:59:in`interpret'  
from NewlineNode.java:105:in `interpret' from ASTInterpreter.java:74:in`INTERPRET\_METHOD'  
from InterpretedMethod.java:225:in `call' from DefaultMethod.java:219:in`call'  
from CachingCallSite.java:346:in `cacheAndCall' from CachingCallSite.java:204:in`call'  
from CallTwoArgNode.java:59:in `interpret' from NewlineNode.java:105:in`interpret'  
from IfNode.java:118:in `interpret' from NewlineNode.java:105:in`interpret'  
from BlockNode.java:71:in `interpret' from ASTInterpreter.java:74:in`INTERPRET\_METHOD'  
from InterpretedMethod.java:268:in `call' from DefaultMethod.java:235:in`call'  
from CachingCallSite.java:366:in `cacheAndCall' from CachingCallSite.java:238:in`call'  
from FCallThreeArgNode.java:40:in `interpret' from NewlineNode.java:105:in`interpret'  
from BlockNode.java:71:in `interpret' from BlockNode.java:71:in`interpret'  
from RescueBodyNode.java:108:in `interpret' from RescueNode.java:174:in`handleException'  
from RescueNode.java:120:in `interpret' from BeginNode.java:83:in`interpret'  
from NewlineNode.java:105:in `interpret' from BlockNode.java:71:in`interpret'  
from ASTInterpreter.java:74:in `INTERPRET_METHOD' from InterpretedMethod.java:182:in`call'  
from DefaultMethod.java:203:in `call' from CachingCallSite.java:326:in`cacheAndCall'  
from CachingCallSite.java:170:in `call' from FCallOneArgNode.java:36:in`interpret'  
from LocalAsgnNode.java:123:in `interpret' from NewlineNode.java:105:in`interpret'  
from BlockNode.java:71:in `interpret' from ASTInterpreter.java:74:in`INTERPRET\_METHOD'  
from InterpretedMethod.java:225:in `call' from DefaultMethod.java:219:in`call'  
from CachingCallSite.java:346:in `cacheAndCall' from CachingCallSite.java:204:in`call'  
from CallTwoArgNode.java:59:in `interpret' from NewlineNode.java:105:in`interpret'  
from BlockNode.java:71:in `interpret' from RescueNode.java:221:in`executeBody'  
from RescueNode.java:116:in `interpret' from EnsureNode.java:96:in`interpret'  
from ASTInterpreter.java:74:in `INTERPRET_METHOD' from InterpretedMethod.java:139:in`call'  
from DefaultMethod.java:187:in `call' from CachingCallSite.java:306:in`cacheAndCall'  
from CachingCallSite.java:136:in `call' from VCallNode.java:88:in`interpret'  
from NewlineNode.java:105:in `interpret' from BlockNode.java:71:in`interpret'  
from ASTInterpreter.java:74:in `INTERPRET_METHOD' from InterpretedMethod.java:204:in`call'  
from DefaultMethod.java:211:in `call' from SuperCallSite.java:366:in`cacheAndCall'  
from SuperCallSite.java:192:in `callBlock' from SuperCallSite.java:197:in`call'  
from SuperCallSite.java:108:in `callVarargs' from SuperNode.java:115:in`interpret'  
from NewlineNode.java:105:in `interpret' from BlockNode.java:71:in`interpret'  
from ASTInterpreter.java:74:in `INTERPRET\_METHOD'

Anyone answers，tks!!!

---

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [May 7, 2018, 8:43am UTC](https://discuss.elastic.co/t/logstash-log4j-properties-config/130573/2 "2018-05-07T08:43:58Z")

</div>

which java version?

---

<div class="post-metadata">

### Author: ![z377023694](https://avatars.discourse-cdn.com/v4/letter/z/87869e/32.png) [@z377023694](https://discuss.elastic.co/u/z377023694)
#### Post date: [May 8, 2018, 8:51am UTC](https://discuss.elastic.co/t/logstash-log4j-properties-config/130573/3 "2018-05-08T08:51:12Z")

</div>

jdk 1.8

---

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [May 8, 2018, 8:53am UTC](https://discuss.elastic.co/t/logstash-log4j-properties-config/130573/4 "2018-05-08T08:53:33Z")

</div>

see this with java  
[https://www.elastic.co/support/matrix#matrix\_jvm](https://www.elastic.co/support/matrix#matrix_jvm)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 5, 2018, 9:04am UTC](https://discuss.elastic.co/t/logstash-log4j-properties-config/130573/5 "2018-06-05T09:04:45Z")

</div>

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