keycloak-uncached

Merge pull request #3907 from mposolda/cross-dc KEYCLOAK-4520

3/2/2017 8:23:36 AM

Details

diff --git a/testsuite/integration-arquillian/HOW-TO-RUN.md b/testsuite/integration-arquillian/HOW-TO-RUN.md
index c1341fb..f8306ba 100644
--- a/testsuite/integration-arquillian/HOW-TO-RUN.md
+++ b/testsuite/integration-arquillian/HOW-TO-RUN.md
@@ -47,6 +47,17 @@ and you will be able to attach remote debugger to the test. Unfortunately server
 
 TODO: Improve and add more info about Wildfly debugging...
 
+## Testsuite logging
+
+It is configured in `testsuite/integration-arquillian/tests/base/src/test/resources/log4j.properties` . You can see that logging of testsuite itself (category `org.keycloak.testsuite`) is debug by default.
+
+When you run tests with undertow (which is by default), there is logging for Keycloak server and adapter (category `org.keycloak` ) in `info` when you run tests from IDE, but `off` when 
+you run tests with maven. The reason is that, we don't want huge logs when running mvn build. However using system property `keycloak.logging.level` will override it. This can be used for both IDE or maven.
+So for example using `-Dkeycloak.logging.level=debug` will enable debug logging for keycloak server and adapter. 
+
+For more fine-tuning of individual categories, you can look at log4j.properties file and temporarily enable/disable them here.
+
+TODO: Add info about Wildfly logging
 
 ## Run adapter tests
 
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/log4j.properties b/testsuite/integration-arquillian/tests/base/src/test/resources/log4j.properties
index b9541e9..58fde2c 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/log4j.properties
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/log4j.properties
@@ -25,7 +25,9 @@ log4j.appender.testsuite=org.apache.log4j.ConsoleAppender
 log4j.appender.testsuite.layout=org.apache.log4j.PatternLayout
 log4j.appender.testsuite.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%C{1}] %m%n
 
-log4j.logger.org.keycloak=off, keycloak
+# Logging with "info" when running test from IDE, but disabled when running test with "mvn" . Both cases can be overriden by use system property "keycloak.logging.level" (eg. -Dkeycloak.logging.level=debug )
+keycloak.logging.level=info
+log4j.logger.org.keycloak=${keycloak.logging.level}, keycloak
 
 log4j.logger.org.jboss.resteasy.resteasy_jaxrs.i18n=off
 
diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml
index f12e4db..799053e 100755
--- a/testsuite/integration-arquillian/tests/pom.xml
+++ b/testsuite/integration-arquillian/tests/pom.xml
@@ -78,6 +78,8 @@
         <frontend.console.output>true</frontend.console.output>
         <backends.console.output>true</backends.console.output>
 
+        <keycloak.logging.level>off</keycloak.logging.level>
+
         <testsuite.constants>${project.build.directory}/dependency/test-constants.properties</testsuite.constants>
 
         <skip.add.user.json>false</skip.add.user.json>
@@ -187,6 +189,8 @@
                             <firefox_binary>${firefox_binary}</firefox_binary>
                             <phantomjs.cli.args>${phantomjs.cli.args}</phantomjs.cli.args>
 
+                            <keycloak.logging.level>${keycloak.logging.level}</keycloak.logging.level>
+
                             <project.version>${project.version}</project.version>
                             <migration.project.version>${migration.project.version}</migration.project.version>
                             <migration.product.version>${migration.product.version}</migration.product.version>