boolean () { try { String customConfigPath = System.getProperty(PathManager.PROPERTY_LOG_CONFIG_FILE); Path logProperties = customConfigPath != null ? Path.of(customConfigPath) : Path.of(PathManager.getHomePath(), "test-log.properties"); if (Files.exists(logProperties)) { if (customConfigPath != null) System.out.println("Configuring j.u.l.LogManager from file: " + logProperties); try (BufferedInputStream in = new BufferedInputStream(Files.newInputStream(logProperties))) { LogManager.getLogManager().readConfiguration(in); } } else { System.err.println("Configuration file for j.u.l.LogManager does not exist: " + logProperties); } Path logDir = getTestLogDir(); Files.createDirectories(logDir); Path logFile = logDir.resolve(LOG_FILE_NAME); JulLogger.clearHandlers(); JulLogger.configureLogFileAndConsole(logFile, false, false, true, null); if (Files.exists(logFile) && Files.size(logFile) >= LOG_SIZE_LIMIT) { Files.writeString(logFile, ""); } return true; } catch (Throwable e) { e.printStackTrace(); return false; } }