lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: How to write core's name in log
Date Tue, 27 Sep 2011 19:02:35 GMT

: I'm thinking to add MDC variable, this will be name of core. Finally I'll
: use it in log4j configuration like this in ConversionPattern %X{core}
: 
: The idea is that when Solr received a request I'll add this new variable
: "name of core".
: 
: But I don't know if it's a good idea or not.
: 
: or Do you already exists any solution for add name of core in log?

Assuming you definitively want to use log4j, then i think you are on the 
right track -- you could certainly patch SolrDispatchFilter to add the 
name of the selected core as an MDC.

in general, the name of the current core isn't something that every code 
path knows about, so something like this is probably the only option.


-Hoss

Mime
View raw message