It turns out there is a better way to do this. It does not require code change in Solr, if you are using log4j. However, you need to migrate to log4j.xml file format. The solution is to use the filter feature. Here is what my console appender looks like with the filter:
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p - %C - %d{yyyy-MM-dd HH:mm:ss.SSS}: %m\n"/> </layout> <filter class="org.apache.log4j.varia.StringMatchFilter"> <param name="StringToMatch" value="isShard=" /> <param name="acceptOnMatch" value="false"/> </filter> </appender> Regards, Koorosh