Mute JUnit logging to warning level

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • jtreg8.1
    • Affects Version/s: None
    • Component/s: tools
    • None

      jtreg uses JUnit to run JUnit-based tests - and their platform and engines use Java Util Logging to emit message about configuration and runtime information. Some of these messages are at INFO level; and therefore filling up space in jtreg's log files. For example:

      ```
      [14:25:17.515] STARTED ModuleSourceLauncherTests::testHelloModularWorld 'testHelloModularWorld(Path)'
      Sep 08, 2025 2:25:17 PM org.junit.jupiter.engine.extension.TempDirectory$CloseablePath close
      INFO: Skipping cleanup of temp dir /.../testoutput/test-support/jtreg_open_test_langtools_tools_javac_launcher/scratch/5/junit-14907436035595874600 for parameter 'arg0' in method testHelloModularWorld(Path) due to CleanupMode.NEVER.
      [14:25:17.960] SUCCESSFUL ModuleSourceLauncherTests::testHelloModularWorld 'testHelloModularWorld(Path)' [445ms]
      [14:25:17.962] STARTED ModuleSourceLauncherTests::testTwoAndHalfPackages 'testTwoAndHalfPackages(Path)'
      Sep 08, 2025 2:25:18 PM org.junit.jupiter.engine.extension.TempDirectory$CloseablePath close
      INFO: Skipping cleanup of temp dir /.../testoutput/test-support/jtreg_open_test_langtools_tools_javac_launcher/scratch/5/junit-11844551375375345706 for parameter 'arg0' in method testTwoAndHalfPackages(Path) due to CleanupMode.NEVER.
      [14:25:18.097] SUCCESSFUL ModuleSourceLauncherTests::testTwoAndHalfPackages 'testTwoAndHalfPackages(Path)' [135ms]
      [14:25:18.098] STARTED ModuleSourceLauncherTests::testServiceLoading 'testServiceLoading(Path)'
      Sep 08, 2025 2:25:18 PM org.junit.jupiter.engine.extension.TempDirectory$CloseablePath close
      INFO: Skipping cleanup of temp dir /.../testoutput/test-support/jtreg_open_test_langtools_tools_javac_launcher/scratch/5/junit-8484858219412205945 for parameter 'arg0' in method testServiceLoading(Path) due to CleanupMode.NEVER.
      [14:25:18.296] SUCCESSFUL ModuleSourceLauncherTests::testServiceLoading 'testServiceLoading(Path)' [198ms]
      [14:25:18.297] STARTED ModuleSourceLauncherTests::testUserModuleOnModulePath 'testUserModuleOnModulePath(Path)'
      Sep 08, 2025 2:25:18 PM org.junit.jupiter.engine.extension.TempDirectory$CloseablePath close
      INFO: Skipping cleanup of temp dir /.../testoutput/test-support/jtreg_open_test_langtools_tools_javac_launcher/scratch/5/junit-13614783741652476685 for parameter 'arg0' in method testUserModuleOnModulePath(Path) due to CleanupMode.NEVER.
      [14:25:18.883] SUCCESSFUL ModuleSourceLauncherTests::testUserModuleOnModulePath 'testUserModuleOnModulePath(Path)' [586ms]
      ```

      Only lines containing STARTED or SUCCESSFUL are important here.

      The JUnitRunner in jtreg should configure JUL to only pass messages from JUnit at warning or more severe levels.

            Assignee:
            Christian Stein
            Reporter:
            Christian Stein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: