Solr:如何关闭日志记录
好吧,所以我对Solr很兴奋,但我似乎不知道如何降低日志记录级别,以便在我执行大型导入运行时它实际上可以接受地运行。
我甚至不确定它使用的是哪个日志记录框架(因为,你知道,java.util.logging,log4j和commons-logging还不够,我们需要添加slf4j到组合中!好吧,对不起,不得不让那个小小的咆哮溜走。:-)
所以我配置了:src/main/resources/log4j.properties
log4j.rootLogger=WARN, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.conversionPattern=%5p [%t] (%F:%L) - %m%n
org.apache.solr.core=WARN
org.apache.solr.update.processor=WARN
然后为了更好的措施,我已经配置了:src/main/resources/logging.properties
.level = WARNING
com.gwtstore.level=ALL
com.appgravity.level=ALL
org.apache.solr.core.level=WARNING
org.apache.solr.update.processor.level=WARNING
然而,不知何故,我仍然看到以下大量内容:
INFO: {add=[-7757828706308755634]} 0 0
Feb 21, 2011 6:12:23 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=/update params={} status=0 QTime=0
这是我的类路径:
src/test/resources
src/test/java
src/main/resources
src/main/java
idea_rt.jar
junit-rt.jar
deploy.jar
dt.jar
javaws.jar
jce.jar
jconsole.jar
management-agent.jar
plugin.jar
sa-jdi.jar
alt-rt.jar
charsets.jar
classes.jar
jsse.jar
ui.jar
apple_provider.jar
dnsns.jar
localedata.jar
sunjce_provider.jar
sunpkcs11.jar
test-classes
classes
junit-4.8.2.jar
gwt-user-2.1.1.jar
gwt-servlet-2.1.1.jar
servlet-api-2.5.jar
weld-servlet-1.1.0.Final.jar
hibernate-core-3.6.0.Final.jar
antlr-2.7.6.jar
commons-collections-3.2.1.jar
dom4j-1.6.1.jar
hibernate-commons-annotations-3.2.0.Final.jar
slf4j-api-1.6.0.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
jta-1.1.jar
hibernate-entitymanager-3.6.0.Final.jar
javassist-3.12.0.GA.jar
hibernate-c3p0-3.3.1.GA.jar
c3p0-0.9.1.jar
hibernate-validator-4.1.0.Final.jar
validation-api-1.0.0.GA.jar
cglib-nodep-2.2.jar
javax.inject-1.jar
cdi-api-1.0.jar
jboss-interceptor-api-1.1.jar
jsr250-api-1.0.jar
lucene-core-2.9.1.jar
lucene-snowball-2.9.1.jar
mongo-java-driver-2.4.jar
mysql-connector-java-5.1.6.jar
protobuf-java-2.2.0.jar
proxytoys-1.0.jar
quartz-1.8.4.jar
commons-lang-2.5.jar
commons-httpclient-3.1.jar
commons-logging-1.0.4.jar
commons-codec-1.2.jar
nekohtml-1.9.7.jar
xercesImpl-2.8.1.jar
xml-apis-1.3.03.jar
gwtquickstarter.jar
solr-solrj-1.4.1.jar
commons-io-1.4.jar
commons-fileupload-1.2.1.jar
wstx-asl-3.2.7.jar
stax-api-1.0.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
solr-core-1.4.1.jar
lucene-analyzers-2.9.3.jar
lucene-highlighter-2.9.3.jar
lucene-memory-2.9.3.jar
lucene-queries-2.9.3.jar
lucene-misc-2.9.3.jar
lucene-spellchecker-2.9.3.jar
solr-commons-csv-1.4.1.jar
wstx-asl-3.2.7.jar
morphia-0.98s10.jar
androidmarketapi-0.5.jar
openid4java-0.9.5.jar