log removal

This commit is contained in:
Anthony Stirling 2024-01-10 00:37:55 +00:00
parent 139c793b5e
commit 32da14acbf
3 changed files with 12 additions and 26 deletions

View file

@ -68,27 +68,11 @@ public class AppConfig {
@Bean(name = "bookFormatsInstalled") @Bean(name = "bookFormatsInstalled")
public boolean 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(); return applicationProperties.getSystem().getCustomApplications().isInstallBookFormats();
} }
@Bean(name = "htmlFormatsInstalled") @Bean(name = "htmlFormatsInstalled")
public boolean 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 return applicationProperties
.getSystem() .getSystem()
.getCustomApplications() .getCustomApplications()

View file

@ -229,7 +229,6 @@ public class EndpointConfiguration {
private void processEnvironmentConfigs() { private void processEnvironmentConfigs() {
List<String> endpointsToRemove = applicationProperties.getEndpoints().getToRemove(); List<String> endpointsToRemove = applicationProperties.getEndpoints().getToRemove();
List<String> groupsToRemove = applicationProperties.getEndpoints().getGroupsToRemove(); List<String> groupsToRemove = applicationProperties.getEndpoints().getGroupsToRemove();
System.out.println("ASTIRLI7 bookFormatsInstalled=" + bookFormatsInstalled);
if (!bookFormatsInstalled) { if (!bookFormatsInstalled) {
groupsToRemove.add("Calibre"); groupsToRemove.add("Calibre");
} }

View file

@ -1,8 +1,12 @@
package stirling.software.SPDF.config; package stirling.software.SPDF.config;
import java.io.IOException; 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.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -29,11 +33,11 @@ public class PostStartupProcesses {
@Qualifier("htmlFormatsInstalled") @Qualifier("htmlFormatsInstalled")
private boolean htmlFormatsInstalled; private boolean htmlFormatsInstalled;
private static final Logger logger = LoggerFactory.getLogger(PostStartupProcesses.class);
@PostConstruct @PostConstruct
public void runInstallCommandBasedOnEnvironment() throws IOException, InterruptedException { public void runInstallCommandBasedOnEnvironment() throws IOException, InterruptedException {
List<List<String>> commands = new ArrayList<>(); List<List<String>> commands = new ArrayList<>();
System.out.println("astirli bookFormatsInstalled=" + bookFormatsInstalled);
System.out.println("astirli htmlFormatsInstalled=" + htmlFormatsInstalled);
// Checking for DOCKER_INSTALL_BOOK_FORMATS environment variable // Checking for DOCKER_INSTALL_BOOK_FORMATS environment variable
if (bookFormatsInstalled) { if (bookFormatsInstalled) {
List<String> tmpList = new ArrayList<>(); List<String> tmpList = new ArrayList<>();
@ -77,18 +81,17 @@ public class PostStartupProcesses {
ProcessExecutorResult returnCode = ProcessExecutorResult returnCode =
ProcessExecutor.getInstance(ProcessExecutor.Processes.INSTALL_APP, true) ProcessExecutor.getInstance(ProcessExecutor.Processes.INSTALL_APP, true)
.runCommandWithOutputHandling(list); .runCommandWithOutputHandling(list);
System.out.println("astirli RC for app installs " + returnCode.getRc()); logger.info("RC for app installs {}", returnCode.getRc());
} }
} else { } 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 { } else {
if (runningInDocker) { if (runningInDocker) {
System.out.println("astirli No custom apps to install."); logger.info("No custom apps to install.");
} else {
System.out.println("astirli No custom apps to install. and not docker");
} }
} }
} }