solr loging
mkdir /var/log/solr
chown tomcat /var/log/solr
cd solr-4.9.0/example/lib/ext/
cp * /usr/share/tomcat6/lib
cp * /usr/share/tomcat6/webapps/solr/WEB-INF/lib/
cd slf4j-1.7.12/
cp slf4j-api-1.7.12.jar /usr/share/tomcat/lib/
cp slf4j-api-1.7.12.jar /usr/share/tomcat6/webapps/solr/WEB-INF/lib/
cp slf4j-log4j12-1.7.12.jar /usr/share/tomcat/lib/
cp slf4j-log4j12-1.7.12.jar /usr/share/tomcat6/webapps/solr/WEB-INF/lib/
mkdir /usr/share/tomcat6/webapps/solr/WEB-INF/classes
chown -R tomcat /usr/share/tomcat6/webapps/solr/WEB-INF/classes
Create a log4j.properties in this folder with the following sample content
log4j.rootLogger=WARN, solrLog
log4j.appender.solrLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.solrLog.File=/var/log/solr/solr.log
log4j.appender.solrLog.Append=true
log4j.appender.solrLog.Encoding=UTF-8
log4j.appender.solrLog.DatePattern=’-‘yyyy-MM-dd
log4j.appender.solrLog.layout=org.apache.log4j.PatternLayout
log4j.appender.solrLog.layout.ConversionPattern=%d [%t] %-5p %c – %m%n
log4j.logger.org.apache.solr=INFO
service tomcat restart
Now you will find a solr.log inside/var/log/solr/
chown tomcat /var/log/solr
cd solr-4.9.0/example/lib/ext/
cp * /usr/share/tomcat6/lib
cp * /usr/share/tomcat6/webapps/solr/WEB-INF/lib/
cd slf4j-1.7.12/
cp slf4j-api-1.7.12.jar /usr/share/tomcat/lib/
cp slf4j-api-1.7.12.jar /usr/share/tomcat6/webapps/solr/WEB-INF/lib/
cp slf4j-log4j12-1.7.12.jar /usr/share/tomcat/lib/
cp slf4j-log4j12-1.7.12.jar /usr/share/tomcat6/webapps/solr/WEB-INF/lib/
mkdir /usr/share/tomcat6/webapps/solr/WEB-INF/classes
chown -R tomcat /usr/share/tomcat6/webapps/solr/WEB-INF/classes
Create a log4j.properties in this folder with the following sample content
log4j.rootLogger=WARN, solrLog
log4j.appender.solrLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.solrLog.File=/var/log/solr/solr.log
log4j.appender.solrLog.Append=true
log4j.appender.solrLog.Encoding=UTF-8
log4j.appender.solrLog.DatePattern=’-‘yyyy-MM-dd
log4j.appender.solrLog.layout=org.apache.log4j.PatternLayout
log4j.appender.solrLog.layout.ConversionPattern=%d [%t] %-5p %c – %m%n
log4j.logger.org.apache.solr=INFO
service tomcat restart
Now you will find a solr.log inside/var/log/solr/
source1
source2
Awesome work.Just wanted to drop a comment and say I am new to your blog and really like what I am reading.Thanks for the share
ReplyDeleteThat is an extremely smartly written article. I will be sure to bookmark it and return to learn extra of your useful information. Thank you for the post. I will certainly return.
ReplyDeleteGreat, Keep it up! I really admire your writing skills.
ReplyDelete