From 0136c25e1d3cdbccd3cdc2a12dcecc191d233887 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.> Date: Sat, 4 Jan 2025 13:12:34 +0000 Subject: [PATCH] remove logs --- build.gradle | 1 + .../SPDF/config/EndpointConfiguration.java | 2 +- .../SPDF/config/YamlPropertySourceFactory.java | 11 ----------- .../SPDF/model/ApplicationProperties.java | 6 +++--- src/main/resources/settings.yml.template | 16 ++++++++-------- 5 files changed, 13 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 5a8e2c3d..088e8d81 100644 --- a/build.gradle +++ b/build.gradle @@ -124,6 +124,7 @@ jpackage { launcherAsService = false appVersion = project.version + winConsole = false winMenu = true // Creates start menu entry winShortcut = true // Creates desktop shortcut winShortcutPrompt = true // Lets user choose whether to create shortcuts diff --git a/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java b/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java index 64dc0102..50fb4d04 100644 --- a/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java +++ b/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java @@ -272,7 +272,7 @@ public class EndpointConfiguration { if (!bookAndHtmlFormatsInstalled) { if(groupsToRemove == null) { - groupsToRemove = new ArrayList(); + groupsToRemove = new ArrayList<>(); } groupsToRemove.add("Calibre"); } diff --git a/src/main/java/stirling/software/SPDF/config/YamlPropertySourceFactory.java b/src/main/java/stirling/software/SPDF/config/YamlPropertySourceFactory.java index 459fcc21..5f655d54 100644 --- a/src/main/java/stirling/software/SPDF/config/YamlPropertySourceFactory.java +++ b/src/main/java/stirling/software/SPDF/config/YamlPropertySourceFactory.java @@ -9,8 +9,6 @@ import org.springframework.core.env.PropertySource; import org.springframework.core.io.support.EncodedResource; import org.springframework.core.io.support.PropertySourceFactory; -import lombok.extern.slf4j.Slf4j; -@Slf4j public class YamlPropertySourceFactory implements PropertySourceFactory { @Override @@ -20,15 +18,6 @@ public class YamlPropertySourceFactory implements PropertySourceFactory { factory.setResources(encodedResource.getResource()); Properties properties = factory.getObject(); - // Add debug logging - if (properties != null) { - log.info("Loaded properties count: {}", properties.size()); - properties.forEach((key, value) -> - log.info("Property loaded - Key: {}, Value: {}", key, value)); - } else { - log.warn("No properties loaded from resource"); - } - return new PropertiesPropertySource( encodedResource.getResource().getFilename(), properties); } diff --git a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java index 8890f9fa..d37eaba5 100644 --- a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java +++ b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java @@ -50,11 +50,11 @@ public class ApplicationProperties { public PropertySource dynamicYamlPropertySource(ConfigurableEnvironment environment) throws IOException { String configPath = InstallationPathConfig.getSettingsPath(); - log.info("Attempting to load settings from: " + configPath); + log.debug("Attempting to load settings from: " + configPath); File file = new File(configPath); if (!file.exists()) { - log.info("Warning: Settings file does not exist at: " + configPath); + log.error("Warning: Settings file does not exist at: " + configPath); } Resource resource = new FileSystemResource(configPath); @@ -67,7 +67,7 @@ public class ApplicationProperties { new YamlPropertySourceFactory().createPropertySource(null, encodedResource); environment.getPropertySources().addFirst(propertySource); - log.info("Loaded properties: " + propertySource.getSource()); + log.debug("Loaded properties: " + propertySource.getSource()); return propertySource; } diff --git a/src/main/resources/settings.yml.template b/src/main/resources/settings.yml.template index 6960cf67..03b75d2d 100644 --- a/src/main/resources/settings.yml.template +++ b/src/main/resources/settings.yml.template @@ -106,14 +106,14 @@ AutomaticallyGenerated: processExecutor: sessionLimit: # Process executor instances limits - libreOfficeSessionLimit: 100 - pdfToHtmlSessionLimit: 100 - qpdfSessionLimit: 400 - tesseractSessionLimit: 100 - pythonOpenCvSessionLimit: 800 - weasyPrintSessionLimit: 1600 - installAppSessionLimit: 100 - calibreSessionLimit: 100 + libreOfficeSessionLimit: 1 + pdfToHtmlSessionLimit: 1 + qpdfSessionLimit: 4 + tesseractSessionLimit: 1 + pythonOpenCvSessionLimit: 8 + weasyPrintSessionLimit: 16 + installAppSessionLimit: 1 + calibreSessionLimit: 1 timeoutMinutes: # Process executor timeout in minutes libreOfficetimeoutMinutes: 30 pdfToHtmltimeoutMinutes: 20