Framework way? Maybe try delving into the log4j framework and modify the log4j.properties file. You can generate different log files based upon what class generated the message. Here's an example that I experimented with previously, it generates an update log, and 2 different query logs with slightly different information about each query.
Adding a component to each requestHandler dedicated to logging might be the best way, but that might not qualify as a "framework way", and I've never tried anything like that, so don't know how easy it might be. Just sending the relevant lines from log4j.properties, excluding the lines that are there by default. # Logger for updates log4j.logger.org.apache.solr.update.processor.LogUpdateProcessor=INFO, Updates #- size rotation with log cleanup. log4j.appender.Updates=org.apache.log4j.RollingFileAppender log4j.appender.Updates.MaxFileSize=4MB log4j.appender.Updates.MaxBackupIndex=9 #- File to log to and log format log4j.appender.Updates.File=${solr.log}/solr_Updates.log log4j.appender.Updates.layout=org.apache.log4j.PatternLayout log4j.appender.Updates.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m\n # Logger for queries, using SolrDispatchFilter log4j.logger.org.apache.solr.servlet.SolrDispatchFilter=DEBUG, queryLog1 #- size rotation with log cleanup. log4j.appender.queryLog1=org.apache.log4j.RollingFileAppender log4j.appender.queryLog1.MaxFileSize=4MB log4j.appender.queryLog1.MaxBackupIndex=9 #- File to log to and log format log4j.appender.queryLog1.File=${solr.log}/solr_queryLog1.log log4j.appender.queryLog1.layout=org.apache.log4j.PatternLayout log4j.appender.queryLog1.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m\n # Logger for queries, using SolrCore log4j.logger.org.apache.solr.core.SolrCore=INFO, queryLog2 #- size rotation with log cleanup. log4j.appender.queryLog2=org.apache.log4j.RollingFileAppender log4j.appender.queryLog2.MaxFileSize=4MB log4j.appender.queryLog2.MaxBackupIndex=9 #- File to log to and log format log4j.appender.queryLog2.File=${solr.log}/solr_queryLog2.log log4j.appender.queryLog2.layout=org.apache.log4j.PatternLayout log4j.appender.queryLog2.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m\n -----Original Message----- From: rbkumar88 [mailto:rbkuma...@gmail.com] Sent: Thursday, June 18, 2015 10:41 AM To: solr-user@lucene.apache.org Subject: Solr Logging Hi, I want to log Solr search queries/response time and Solr indexing log separately in different set of log files. Is there any convenient framework/way to do it. Thanks Bharath -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Logging-tp4212730.html Sent from the Solr - User mailing list archive at Nabble.com.