1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-09-29 16:10:11 +02:00

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")
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()

View File

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

View File

@ -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<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
if (bookFormatsInstalled) {
List<String> 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.");
}
}
}