diff --git a/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java b/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java index 23c216123..7b8933c67 100644 --- a/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java +++ b/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java @@ -73,11 +73,11 @@ public class ApplicationProperties { public PropertySource dynamicYamlPropertySource(ConfigurableEnvironment environment) throws IOException { String configPath = InstallationPathConfig.getSettingsPath(); - log.debug("Attempting to load settings from: " + configPath); + log.debug("Attempting to load settings from: {}", configPath); File file = new File(configPath); if (!file.exists()) { - log.error("Warning: Settings file does not exist at: " + configPath); + log.error("Warning: Settings file does not exist at: {}", configPath); } Resource resource = new FileSystemResource(configPath); @@ -90,7 +90,7 @@ public class ApplicationProperties { new YamlPropertySourceFactory().createPropertySource(null, encodedResource); environment.getPropertySources().addFirst(propertySource); - log.debug("Loaded properties: " + propertySource.getSource()); + log.debug("Loaded properties: {}", propertySource.getSource()); return propertySource; } diff --git a/app/common/src/main/java/stirling/software/common/util/ProcessExecutor.java b/app/common/src/main/java/stirling/software/common/util/ProcessExecutor.java index de23c2966..514e16212 100644 --- a/app/common/src/main/java/stirling/software/common/util/ProcessExecutor.java +++ b/app/common/src/main/java/stirling/software/common/util/ProcessExecutor.java @@ -167,7 +167,7 @@ public class ProcessExecutor { semaphore.acquire(); try { - log.info("Running command: " + String.join(" ", command)); + log.info("Running command: {}", String.join(" ", command)); ProcessBuilder processBuilder = new ProcessBuilder(command); // Use the working directory if it's set @@ -252,7 +252,7 @@ public class ProcessExecutor { String outputMessage = String.join("\n", outputLines); messages += outputMessage; if (!liveUpdates) { - log.info("Command output:\n" + outputMessage); + log.info("Command output:\n{}", outputMessage); } } @@ -260,7 +260,7 @@ public class ProcessExecutor { String errorMessage = String.join("\n", errorLines); messages += errorMessage; if (!liveUpdates) { - log.warn("Command error output:\n" + errorMessage); + log.warn("Command error output:\n{}", errorMessage); } if (exitCode != 0) { if (isQpdf && exitCode == 3) { diff --git a/app/core/src/main/java/stirling/software/SPDF/UI/impl/DesktopBrowser.java b/app/core/src/main/java/stirling/software/SPDF/UI/impl/DesktopBrowser.java index 959e7f354..924a26f1e 100644 --- a/app/core/src/main/java/stirling/software/SPDF/UI/impl/DesktopBrowser.java +++ b/app/core/src/main/java/stirling/software/SPDF/UI/impl/DesktopBrowser.java @@ -119,7 +119,7 @@ public class DesktopBrowser implements WebBrowser { private void configureCefSettings(CefAppBuilder builder) { CefSettings settings = builder.getCefSettings(); String basePath = InstallationPathConfig.getClientWebUIPath(); - log.info("basePath " + basePath); + log.info("basePath {}", basePath); settings.cache_path = new File(basePath + "cache").getAbsolutePath(); settings.root_cache_path = new File(basePath + "root_cache").getAbsolutePath(); // settings.browser_subprocess_path = new File(basePath + @@ -136,7 +136,7 @@ public class DesktopBrowser implements WebBrowser { new MavenCefAppHandlerAdapter() { @Override public void stateHasChanged(org.cef.CefApp.CefAppState state) { - log.info("CEF state changed: " + state); + log.info("CEF state changed: {}", state); if (state == CefApp.CefAppState.TERMINATED) { System.exit(0); } @@ -163,9 +163,9 @@ public class DesktopBrowser implements WebBrowser { CefDownloadItem downloadItem, CefDownloadItemCallback callback) { if (downloadItem.isComplete()) { - log.info("Download completed: " + downloadItem.getFullPath()); + log.info("Download completed: {}", downloadItem.getFullPath()); } else if (downloadItem.isCanceled()) { - log.info("Download canceled: " + downloadItem.getFullPath()); + log.info("Download canceled: {}", downloadItem.getFullPath()); } } }); @@ -409,7 +409,7 @@ public class DesktopBrowser implements WebBrowser { } } } catch (Exception e) { - log.debug("Could not load icon from " + path, e); + log.debug("Could not load icon from {}", path, e); } } diff --git a/app/core/src/main/java/stirling/software/SPDF/UI/impl/LoadingWindow.java b/app/core/src/main/java/stirling/software/SPDF/UI/impl/LoadingWindow.java index 0d307f2d9..35b3af62d 100644 --- a/app/core/src/main/java/stirling/software/SPDF/UI/impl/LoadingWindow.java +++ b/app/core/src/main/java/stirling/software/SPDF/UI/impl/LoadingWindow.java @@ -227,9 +227,7 @@ public class LoadingWindow extends JDialog { if (!existingPids .contains( pid)) { - log.debug( - "Found new explorer.exe with PID: " - + pid); + log.debug("Found new explorer.exe with PID: {}", pid); ProcessBuilder killProcess = new ProcessBuilder( @@ -247,9 +245,7 @@ public class LoadingWindow extends JDialog { 2, TimeUnit .SECONDS); - log.debug( - "Explorer process terminated: " - + pid); + log.debug("Explorer process terminated: {}", pid); } } } @@ -320,7 +316,7 @@ public class LoadingWindow extends JDialog { mainPanel.revalidate(); mainPanel.repaint(); } catch (Exception e) { - log.error("Error updating progress to " + progress, e); + log.error("Error updating progress to {}", progress, e); } }); } @@ -345,7 +341,7 @@ public class LoadingWindow extends JDialog { mainPanel.revalidate(); mainPanel.repaint(); } catch (Exception e) { - log.error("Error updating status to: " + status, e); + log.error("Error updating status to: {}", status, e); } }); } diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index b1112240e..6c6d9c81f 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -263,8 +263,8 @@ public class RearrangePagesPDFController { } else { newPageOrder = GeneralUtils.parsePageList(pageOrderArr, totalPages, false); } - log.info("newPageOrder = " + newPageOrder); - log.info("totalPages = " + totalPages); + log.info("newPageOrder = {}", newPageOrder); + log.info("totalPages = {}", totalPages); // Create a new list to hold the pages in the new order List newPages = new ArrayList<>(); for (int i = 0; i < newPageOrder.size(); i++) { diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java index bd3dd5475..b14a80fb8 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java @@ -806,7 +806,7 @@ public class CompressController { try { Files.deleteIfExists(tempFile); } catch (IOException e) { - log.warn("Failed to delete temporary file: " + tempFile, e); + log.warn("Failed to delete temporary file: {}", tempFile, e); } } } diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java index d972fc65d..3cfeff80d 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java @@ -219,7 +219,7 @@ public class ExtractImageScansController { try { Files.deleteIfExists(path); } catch (IOException e) { - log.error("Failed to delete temporary image file: " + path, e); + log.error("Failed to delete temporary image file: {}", path, e); } }); @@ -227,7 +227,7 @@ public class ExtractImageScansController { try { Files.deleteIfExists(tempZipFile); } catch (IOException e) { - log.error("Failed to delete temporary zip file: " + tempZipFile, e); + log.error("Failed to delete temporary zip file: {}", tempZipFile, e); } } @@ -236,7 +236,7 @@ public class ExtractImageScansController { try { FileUtils.deleteDirectory(dir.toFile()); } catch (IOException e) { - log.error("Failed to delete temporary directory: " + dir, e); + log.error("Failed to delete temporary directory: {}", dir, e); } }); } diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/PrintFileController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/PrintFileController.java index 664383509..7c29216e6 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/PrintFileController.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/PrintFileController.java @@ -68,7 +68,7 @@ public class PrintFileController { new IllegalArgumentException( "No matching printer found")); - log.info("Selected Printer: " + selectedService.getName()); + log.info("Selected Printer: {}", selectedService.getName()); if (MediaType.APPLICATION_PDF_VALUE.equals(contentType)) { PDDocument document = Loader.loadPDF(file.getBytes()); diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java index 7c1744617..4ca863112 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java @@ -339,7 +339,7 @@ public class PipelineProcessor { } Path path = Paths.get(file.getAbsolutePath()); // debug statement - log.info("Reading file: " + path); + log.info("Reading file: {}", path); if (Files.exists(path)) { Resource fileResource = new ByteArrayResource(Files.readAllBytes(path)) { @@ -351,7 +351,7 @@ public class PipelineProcessor { }; outputFiles.add(fileResource); } else { - log.info("File not found: " + path); + log.info("File not found: {}", path); } } log.info("Files successfully loaded. Starting processing..."); diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/security/configuration/ee/KeygenLicenseVerifier.java b/app/proprietary/src/main/java/stirling/software/proprietary/security/configuration/ee/KeygenLicenseVerifier.java index 717b5a939..d5902bcfa 100644 --- a/app/proprietary/src/main/java/stirling/software/proprietary/security/configuration/ee/KeygenLicenseVerifier.java +++ b/app/proprietary/src/main/java/stirling/software/proprietary/security/configuration/ee/KeygenLicenseVerifier.java @@ -758,7 +758,7 @@ public class KeygenLicenseVerifier { HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); - log.info("activateMachine Response body: " + response.body()); + log.info("activateMachine Response body: {}", response.body()); if (response.statusCode() == 201) { log.info("Machine activated successfully"); return true;