On 4/11/2014 3:21 PM, Shawn Heisey wrote:
> This is lucene_solr_4_7_2_r1586229, downloaded from the release
> manager's staging area.
> 
> I configured the following in my log4j.properties file:
> 
> log4j.rootLogger=WARN, file
> log4j.category.org.apache.solr.core.SolrCore=INFO, file
> 
> Now EVERYTHING that SolrCore logs (which is all at INFO) is being logged
> twice.
> 
> Should I have done this differently, or is there a bug?
> 
> I am using a container setup that is almost exactly like the example. 
> The slf4j jars have been upgraded to 1.7.6 and jetty's jars have been
> upgraded to 8.1.14.

I did figure out how to fix it:

log4j.additivity.org.apache.solr.core.SolrCore=false

I do not know what actually caused the additivity, though.  I can't see
anything in my logging config that would result in that class being
asked to log twice.  Full config below:

----------------------------
#  Logging level
log4j.rootLogger=WARN, file
log4j.category.org.apache.solr.core.SolrCore=INFO, file
log4j.additivity.org.apache.solr.core.SolrCore=false

#- size rotation with log cleanup.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.MaxFileSize=2GB
log4j.appender.file.MaxBackupIndex=9

#- File to log to and log format
log4j.appender.file.File=/index/solr4/logs/solr.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd
HH:mm:ss.SSS}; %C; %m\n
----------------------------

Thanks,
Shawn

Reply via email to