You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Cam Bazz <ca...@gmail.com> on 2010/07/09 05:46:39 UTC

making rotating timestamped logs from solr output

Hello,

I would like to log the solr console. although solr logs requests in
timestamped format, this only logs the requests, i.e. does not log
number of hits for a given query, etc.

is there any easy way to do this other then reverting to methods for
capturing solr output. I usually run solr on my server using screen
command first, running solr, then detaching from console.

but it would be nice to have output logging instead of request logging.

best regards,
c.b.

Re: making rotating timestamped logs from solr output

Posted by Chris Hostetter <ho...@fucit.org>.
The entire wording/phrasing of your email leads me to suspect that you are 
using the example jetty server provided with solr (ie: java -jar 
start.jar) and that you aren't clear on the distinction between the logs 
generated by jetty and the logs generated by solr.

the simple instance of Jetty thta you get when running java -jar start.jar 
does request logging into the example/logs directory -- while various 
debug/info/warn/error messages from the java code are all configured 
to be logged to the console specificly because it's an example, we want 
you to see what types of things are logged.

For a "real" installation of Solr, i would recommend you look into 
something line init.d or "services" in windows (i think that's what they 
are called) to ensure that the servlet container is started as a daemon 
(independent of your user session).  You can then configure your serlvet 
container to log anyway you want it to...
   http://wiki.apache.org/solr/SolrLogging

That said: "request" logging from your servlet container only knows about 
the HTTP level request/response information -- it has no way of knowing 
about things like number of hits.  those things are logged by Solr, but 
there is a single log message per request that does includes this 
information, so you can configure LogHandlers to direct copies of these 
specific messages to a special file (i can't remember the pattern off the 
top of my head)

: Hello,
: 
: I would like to log the solr console. although solr logs requests in
: timestamped format, this only logs the requests, i.e. does not log
: number of hits for a given query, etc.
: 
: is there any easy way to do this other then reverting to methods for
: capturing solr output. I usually run solr on my server using screen
: command first, running solr, then detaching from console.
: 
: but it would be nice to have output logging instead of request logging.
: 
: best regards,
: c.b.
: 



-Hoss