lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Rothenberg <>
Subject Re: diff logging for each solr-core?
Date Mon, 14 Jun 2010 12:04:48 GMT
On Monday 14 June 2010 13:21:31 Peter Karich wrote:
> as I understand the thread you will have to change the solr src then,
> right? The logPath is not available or did I understand something wrong?

For me, i will only change my own custom-code, not the orginal src from solr. 
I had to write a custom dataSource-plugin and a custom dataImportHandler to 
index over 300 db's (database design of our customers is special... :s ) and 
badly need to see which log-msg comes from which solrcore. 
It will not be possible to really influence the logpath from inside the 

The only way i know is altering the log4j.xml for example:

<appender name="importLog" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="File" value="/var/log/indexer_log" />
    <param name="Append" value="true" />
    <param name="DatePattern" value="yyyy-MM-dd" />
    <layout class="org.apache.log4j.PatternLayout">
      <!-- Not the default pattern: Date Priority [Category] Message\n -->
      <!-- But added Linenumbers %L -->
      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%C 
line %L]: %m%n"/>

<logger name="org.apache.solr.handler.dataimport" additivity="false">
    <level value="INFO"/>
    <appender-ref ref="importLog" />

this would write all log-msg's from the 
java-package "org.apache.solr.handler.dataimport" to /var/log/indexer_log
(and my custom classes are in org.apache.solr.handler.dataimport)

Alexander Rothenberg
Fotofinder GmbH		USt-IdNr. DE812854514
Software Entwicklung	Web:
Potsdamer Str. 96	Tel: +49 30 25792890
10785 Berlin		Fax: +49 30 257928999

Geschäftsführer:	Ali Paczensky
Amtsgericht:		Berlin Charlottenburg (HRB 73099)
Sitz:			Berlin

View raw message