I don't understand "How to enable DEBUG/TRACE logging?"


Hi! I'm trying to use "com.intellij.openapi.diagnostic.Logger", but I do not see any "debug" logs in the console when running tests.

  • I created a Logger using "ocaml.sdk-provider"
  • In "Help > Diagnostic Tools > Debug Log Settings", I have "ocaml.sdk-provider"

This is what is explained in IDE Infrastructure | IntelliJ Platform Plugin SDK (jetbrains.com). According to the FAQ, Testing FAQ | IntelliJ Platform Plugin SDK (jetbrains.com), I should "Set system properties idea.log.debug.categories or idea.log.trace.categories, respectively.". I'm not sure what it means, so I tried this,

public void testLogger() {
SystemProperties.setProperty("idea.log.debug.categories", "ocaml.sdk-provider");
Logger instance = Logger.getInstance("ocaml.sdk-provider");
instance.debug("log: a message");
System.out.println("print: a message");

Unfortunately, there is nothing aside that

I think I'm missing something, but I lack the knowledge to find what (I want to see the logs in the console, to ensure that I added enough tests, because the "data flow" is the one that I expected). Can someone give me some pointers, please?


You need to pass in the system properties when invoking the tests, e.g. from Gradle build via "systemProperty" for your "test" task.


Please sign in to leave a comment.