SolrDispatchFilter is where HTTP headers get set, and currently there isn't 
really any flexibility on Solr response writers being able to affect HTTP 
headers.  (note here that it isn't necessarily true that Solr requests are 
happening over HTTP, so that's not always a given)

You could come up with your own dispatch filter, or perhaps you could push the 
info you want logged into your Solr requests as additional (unused internal to 
Solr) HTTP parameters.  Solr will log all parameters sent in, making it a 
convenient way to add some request context to logs.

        Erik


On Nov 10, 2011, at 20:50 , alex_mass wrote:

> Hello
> 
> we are using solr beyong a httpd reverse proxy.
> 
> We'd like to mix up solr log information together with apache:
> * info coming from apache (user_track module to follow user over several
> session) etc.
> * solr info (nbhits ...)
> 
> The idea is that we have all our logs at the same place with a common
> format.
> And we can make a global log analysis (apache normal + the solr part)
> 
> On idea would be to be able to add nbhits into the responseHeader that
> apache can see and parse.
> Is that possible?
> 
> I've trie to make my own public class JSONHeaderResponseWriter extends
> JSONResponseWriter {...}
> 
> and implement write, adding:
>               rsp.getResponseHeader().add("numFoundPIPO", numFound);
> But his will add my value to the json response header, not the servelt one.
> 
> Is that possible with another method?
> 
> Am i simply on the wrong route?
> 
> thanks for the help
> Alex
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/How-to-mix-solr-query-info-into-the-apache-httpd-logging-reverseproxy-tp3498539p3498539.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to