From 32da14acbf85dd2f1f33cd67f3707ec820ffc392 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Wed, 10 Jan 2024 00:37:55 +0000 Subject: [PATCH] log removal --- .../software/SPDF/config/AppConfig.java | 16 -------------- .../SPDF/config/EndpointConfiguration.java | 1 - .../SPDF/config/PostStartupProcesses.java | 21 +++++++++++-------- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/config/AppConfig.java b/src/main/java/stirling/software/SPDF/config/AppConfig.java index b740707a..cf05fd1b 100644 --- a/src/main/java/stirling/software/SPDF/config/AppConfig.java +++ b/src/main/java/stirling/software/SPDF/config/AppConfig.java @@ -68,27 +68,11 @@ public class AppConfig { @Bean(name = "bookFormatsInstalled") public boolean bookFormatsInstalled() { - System.out.println("astirli " + applicationProperties.getSystem()); - System.out.println("astirli2 " + applicationProperties.getSystem().getCustomApplications()); - System.out.println( - "astirli3 " - + applicationProperties - .getSystem() - .getCustomApplications() - .isInstallBookFormats()); return applicationProperties.getSystem().getCustomApplications().isInstallBookFormats(); } @Bean(name = "htmlFormatsInstalled") public boolean htmlFormatsInstalled() { - System.out.println("astirli4 " + applicationProperties.getSystem()); - System.out.println("astirli5 " + applicationProperties.getSystem().getCustomApplications()); - System.out.println( - "astirli6 " - + applicationProperties - .getSystem() - .getCustomApplications() - .isInstallAdvancedHtmlToPDF()); return applicationProperties .getSystem() .getCustomApplications() diff --git a/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java b/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java index a56949ae..f1e328f9 100644 --- a/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java +++ b/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java @@ -229,7 +229,6 @@ public class EndpointConfiguration { private void processEnvironmentConfigs() { List endpointsToRemove = applicationProperties.getEndpoints().getToRemove(); List groupsToRemove = applicationProperties.getEndpoints().getGroupsToRemove(); - System.out.println("ASTIRLI7 bookFormatsInstalled=" + bookFormatsInstalled); if (!bookFormatsInstalled) { groupsToRemove.add("Calibre"); } diff --git a/src/main/java/stirling/software/SPDF/config/PostStartupProcesses.java b/src/main/java/stirling/software/SPDF/config/PostStartupProcesses.java index 09216a76..862e5f9e 100644 --- a/src/main/java/stirling/software/SPDF/config/PostStartupProcesses.java +++ b/src/main/java/stirling/software/SPDF/config/PostStartupProcesses.java @@ -1,8 +1,12 @@ package stirling.software.SPDF.config; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; @@ -29,11 +33,11 @@ public class PostStartupProcesses { @Qualifier("htmlFormatsInstalled") private boolean htmlFormatsInstalled; + private static final Logger logger = LoggerFactory.getLogger(PostStartupProcesses.class); + @PostConstruct public void runInstallCommandBasedOnEnvironment() throws IOException, InterruptedException { List> commands = new ArrayList<>(); - System.out.println("astirli bookFormatsInstalled=" + bookFormatsInstalled); - System.out.println("astirli htmlFormatsInstalled=" + htmlFormatsInstalled); // Checking for DOCKER_INSTALL_BOOK_FORMATS environment variable if (bookFormatsInstalled) { List tmpList = new ArrayList<>(); @@ -77,18 +81,17 @@ public class PostStartupProcesses { ProcessExecutorResult returnCode = ProcessExecutor.getInstance(ProcessExecutor.Processes.INSTALL_APP, true) .runCommandWithOutputHandling(list); - System.out.println("astirli RC for app installs " + returnCode.getRc()); + logger.info("RC for app installs {}", returnCode.getRc()); } } else { - System.out.println( - "astirli Not running inside Docker so skipping automated install process with command."); + + logger.info( + "Not running inside Docker so skipping automated install process with command."); } } else { if (runningInDocker) { - System.out.println("astirli No custom apps to install."); - } else { - System.out.println("astirli No custom apps to install. and not docker"); + logger.info("No custom apps to install."); } } }