Hi,
I tried solrcore.properties (log.name=logname) but log4J didn't pick it up.
As for your second suggestion (log4j.properties file in <core>/lib/ ) wouldn't
that be overwritten every time the webapps are updated or refreshed. This is
the problem I get when I have changed my
(tomcat/webapps/solr_app/WEB-INF/classes/log4j.properties)
to point to a specific log file for that solr webapp.
So log4j can see my the CATALINA_OPTS="-Dsolr.logs.home=/logs/"
but can't see one local to that webapp.
log4j.appender.FILE.File=${solr.logs.home}/logs/solr_${log.name}.log
Thanks
Russell Taylor
IDS Developer
-----Original Message-----
From: Jan Høydahl [mailto:[email protected]]
Sent: 05 March 2013 23:18
To: [email protected]
Subject: Re: Solr 4.1 on tomcat with log4j and multiple solr webapps
Hi,
Check out <core>/conf/solrcore.properties
http://wiki.apache.org/solr/SolrConfigXml#System_property_substitution
You could put in your core name there. But I seem to recall that the variable
${core) may be pre-filled for you, or perhaps that's just in the scope of
solr.xml?
Or perhaps you could put a unique log4j.properties file in <core>/lib/ and
refer to it as a <lib> tag in solrconfig, but I can't guarantee that it will be
visible to log4j from there?
Let us know what worked.
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com
5. mars 2013 kl. 17:36 skrev Russell Taylor
<[email protected]>:
> I've changed my solr-4.1.0.war file to use log4j, now every instance of solr
> I have on tomcat produces logs to /logs/solr.log
>
> In "tomcat/solr_app1/WEB-INF/classes/log4j.properties" I have a variable to
> set the path for the log file
>
> log4j.appender.FILE.File=${solr.logs.home}/solr.log which is set in
> CATALINA_OPTS="-Dsolr.logs.home=/logs/"
>
> I'd like to have a separate file for each webapp like so
> "log4j.appender.FILE.File=${solr.logs.home}/${solr_webapp}.log".
>
> My Question is:
> How do I pass this variable into each individual solr webapp is it via the
> solr context files?
>
> Thanks
>
> Russ.
>
>
> *******************************************************
> This message (including any files transmitted with it) may contain
> confidential and/or proprietary information, is the property of Interactive
> Data Corporation and/or its subsidiaries, and is directed only to the
> addressee(s). If you are not the designated recipient or have reason to
> believe you received this message in error, please delete this message from
> your system and notify the sender immediately. An unintended recipient's
> disclosure, copying, distribution, or use of this message or any attachments
> is prohibited and may be unlawful.
> *******************************************************
*******************************************************
This message (including any files transmitted with it) may contain confidential
and/or proprietary information, is the property of Interactive Data Corporation
and/or its subsidiaries, and is directed only to the addressee(s). If you are
not the designated recipient or have reason to believe you received this
message in error, please delete this message from your system and notify the
sender immediately. An unintended recipient's disclosure, copying,
distribution, or use of this message or any attachments is prohibited and may
be unlawful.
*******************************************************