Reputation: 700
Currently, log output for Solr looks like:
Feb 23, 2012 6:22:21 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select/ params= {fl=*+score&wt=json&start=0&q=uid:26261178&rows=1} hits=0 status=0 QTime=1
on two separate lines, logged to stdout. How can I go about changing the format of the log output to have the timestamp & query metadata info on a single line? I'm trying to script parsing of these logs but the difficulty is increased by having to "take 2" from the log to get all the relevant info for a particular entry.
I'm running vanilla Solr install as given by the example install, i.e. served by Jetty. Using supervisor to control the actual process.
Upvotes: 1
Views: 2327
Reputation: 32392
Your question is a special case of this one:
Adding log4j.properties to war file (in Solr application)
The log file format can be set in a log4j properties file.
Upvotes: 2