[ https://issues.apache.org/jira/browse/SOLR-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721580#action_12721580 ]
Hoss Man commented on SOLR-1145: -------------------------------- adding support for setInfoStream seems like a good idea, but specifying a filename in the config file and writing a new TimeLoggingPrintStream class smells like reinventing logging. It seems like it would be simpler just to add a new boolean "infoStream" config option, and then leverage the existing logging framework by constructing an instance of a PrintStream that just proxies to SLF4J when the boolean property is true. A PrintStream instance that writes to a Logger seems no harder to implement then an PrintStream that knows how to prepend messages with a timestamp -- and by using the standard logging framework, solr admins can customize it however they want. It looks like someone may have already thought this type of problem through a lot more indepth then us anyway... http://bugzilla.slf4j.org/show_bug.cgi?id=110 > Patch to set IndexWriter.defaultInfoStream from solr.xml > -------------------------------------------------------- > > Key: SOLR-1145 > URL: https://issues.apache.org/jira/browse/SOLR-1145 > Project: Solr > Issue Type: Improvement > Reporter: Chris Harris > Fix For: 1.4 > > Attachments: SOLR-1145.patch, SOLR-1145.patch, SOLR-1145.patch > > > Lucene IndexWriters use an infoStream to log detailed info about indexing > operations for debugging purpose. This patch is an extremely simple way to > allow logging this info to a file from within Solr: After applying the patch, > set the new "defaultInfoStreamFilePath" attribute of the solr element in > solr.xml to the path of the file where you'd like to save the logging > information. > Note that, in a multi-core setup, all cores will end up logging to the same > infoStream log file. This may not be desired. (But it does justify putting > the setting in solr.xml rather than solrconfig.xml.) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.