From 9e60b1ae586d6d25eb0cc384e695452ffeb44707 Mon Sep 17 00:00:00 2001 From: Oliver-Loeffler Date: Tue, 8 Nov 2022 18:24:19 +0100 Subject: [PATCH] Added logging of how many files were supposed to be opened and how many failed. --- .../oracle/javafx/scenebuilder/app/SceneBuilderApp.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java b/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java index d10b0e7d0..d9d03bac7 100644 --- a/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java +++ b/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java @@ -735,6 +735,7 @@ private FileOpenResult performOpenFiles(List fxmlFiles) { assert fxmlFiles != null; assert fxmlFiles.isEmpty() == false; + LOGGER.log(Level.FINE, "Opening {0} files...", fxmlFiles.size()); final Map exceptions = new HashMap<>(); final List openedFiles = new ArrayList<>(); for (File fxmlFile : fxmlFiles) { @@ -764,7 +765,11 @@ private FileOpenResult performOpenFiles(List fxmlFiles) { final PreferencesController pc = PreferencesController.getSingleton(); pc.getRecordGlobal().addRecentItems(openedFiles); } - + if (exceptions.size() > 0) { + LOGGER.log(Level.WARNING, "Failed to open {0} of {1} files!", new Object[] {exceptions.size(), fxmlFiles.size()}); + } else { + LOGGER.log(Level.FINE, "Successfully opened all files."); + } return new FileOpenResult(fxmlFiles, exceptions); }