KEYCLOAK-4520 Enable testsuite logging when running test from IDE
This commit is contained in:
parent
89768ef003
commit
69e61398a6
3 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue