Allow to configure root logging level using system properties. Ex. -Des.logger.level=DEBUG . Defaults to INFO as before.

This commit is contained in:
Boaz Leskes 2013-08-15 14:35:23 +02:00
parent f644ae5550
commit 9869427ef6
3 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,6 @@
rootLogger: INFO, console, file
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
# log action execution errors for easier debugging
action: DEBUG

View File

@ -33,6 +33,7 @@
<lucene.version>4.4.0</lucene.version>
<tests.jvms>auto</tests.jvms>
<tests.shuffle>true</tests.shuffle>
<es.logger.level>INFO</es.logger.level>
</properties>
<repositories>
@ -389,6 +390,7 @@
<es.transport.tcp.compress>${env.ES_TEST_COMPRESS}</es.transport.tcp.compress>
<es.action.wait_on_mapping_change>${env.ES_WAIT_ON_MAPPING_CHANGE}
</es.action.wait_on_mapping_change>
<es.logger.level>${es.logger.level}</es.logger.level>
<java.awt.headless>true</java.awt.headless>
</systemProperties>
</configuration>

View File

@ -1,4 +1,5 @@
log4j.rootLogger=INFO, out
es.logger.level=INFO
log4j.rootLogger=${es.logger.level}, out
log4j.appender.out=org.apache.log4j.ConsoleAppender
log4j.appender.out.layout=org.apache.log4j.PatternLayout