Hey, I'm trying to edit the log4j2 logging configuration for solr. The goal is to get a log file in json format. I configured the the JSONLayout for this purpose inside the rollingFile appender in the log4j2.xml. After this solr stops logging entirely. Solr.log file is empty. Only the solr-8983-console.log file contains 10 lines. The line "2018-09-06 13:22:25.378:INFO:oejs.Server:main: Started @2814ms" is the last one. My first guess was that the jackson-core and jackson-databind jars were missing, but that did not fix the problem.
Does anyone know where to find error-messages or exceptions that point me towards whats going wrong here? This is my current log4j2 config file: <?xml version="1.0" encoding="UTF-8"?> <Configuration> <Appenders> <Console name="STDOUT" target="SYSTEM_OUT"> <PatternLayout> <Pattern> %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n </Pattern> </PatternLayout> </Console> <RollingFile name="RollingFile" fileName="${sys:solr.log.dir}/solr.log" filePattern="${sys:solr.log.dir}/solr.log.%d{yyyy-MM-dd-hh}_%i.zip" > <JsonLayout compact="true" eventEol="true"/> <Policies> <OnStartupTriggeringPolicy /> <SizeBasedTriggeringPolicy size="1 MB"/> <TimeBasedTriggeringPolicy interval="1"/> </Policies> <DefaultRolloverStrategy max="10"/> </RollingFile> <RollingFile name="SlowFile" fileName="${sys:solr.log.dir}/solr_slow_requests.log" filePattern="${sys:solr.log.dir}/solr_slow_requests.log.%i" > <PatternLayout> <Pattern> %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n </Pattern> </PatternLayout> <Policies> <OnStartupTriggeringPolicy /> <SizeBasedTriggeringPolicy size="32 MB"/> </Policies> <DefaultRolloverStrategy max="10"/> </RollingFile> </Appenders> <Loggers> <Logger name="org.apache.hadoop" level="warn"/> <Logger name="org.apache.solr.update.LoggingInfoStream" level="off"/> <Logger name="org.apache.zookeeper" level="warn"/> <Logger name="org.apache.solr.core.SolrCore.SlowRequest" level="info" additivity="false"> <AppenderRef ref="SlowFile"/> <Root level="debug"> <AppenderRef ref="RollingFile"/> <AppenderRef ref="STDOUT"/> </Root> </Loggers> </Configuration> Best regards Michael Aleythe Michael Aleythe Team --(sr)^(ch)-- Java Entwickler | STERNWALD SYSTEMS GMBH Fon +49 351 31 40 6010 Fax +49 351 31 40 6001 E-Mail michael.aley...@sternwald.com Skype michael.aley...@sternwald.com Web www.sternwald.com STERNWALD SYSTEMS GMBH Pohlandstraße 19, 01309 Dresden, Germany Geschäftsführer Ard Meier Registergericht Handelsregister Dresden, HRB 33480 UmSt-ID DE157125091 SUPPORT / HOTLINE Fon +49 173 38 54 752 E-Mail hotl...@sternwald.com Web support.sternwald.net STERNWALD Offices Berlin | Dresden | Düsseldorf | Hamburg | Sofia | Würzburg