From c57140442ca85883e90b4426c8fba36159c63803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 16 Mar 2023 16:00:58 +0100 Subject: [PATCH] testing_faq.md: provide sample for log level config --- topics/basics/testing_plugins/testing_faq.md | 27 +++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/topics/basics/testing_plugins/testing_faq.md b/topics/basics/testing_plugins/testing_faq.md index b19cebae2..e9f4ab2b1 100644 --- a/topics/basics/testing_plugins/testing_faq.md +++ b/topics/basics/testing_plugins/testing_faq.md @@ -61,9 +61,34 @@ In such cases, simply delete test-system/caches in your [sandbox di ### How to enable DEBUG/TRACE logging? -Provide JVM system properties (Gradle: via `systemProperty` for `test` task) `idea.log.debug.categories` or `idea.log.trace.categories`, respectively. +Provide JVM system properties `idea.log.debug.categories` or `idea.log.trace.categories` to specify logger category name, respectively. Multiple categories can be set using a comma separated value list. +**Sample** Set DEBUG level for categories `com.my.plugin.ui` and `com.my.plugin.backend`: + + + + +```kotlin +tasks { + test { + systemProperty("idea.log.debug.categories", "com.my.plugin.ui,com.my.plugin.backend") + } +} +``` + + + + +```groovy +test { + systemProperty("idea.log.debug.categories", "com.my.plugin.ui,com.my.plugin.backend") +} +``` + + + + ### How to get separate logs for failing tests? Set system property `idea.split.test.logs` to `true` to generate separate test log files in splitTestLogs subdirectory for failing tests (WARN/ERROR level messages) (2021.3).