perf: Logging statements to use parameterized messages (#4399)

This commit is contained in:
Balázs Szücs
2025-09-28 22:17:58 +02:00
committed by GitHub
parent d5a3f768bc
commit e44d5f3714
10 changed files with 25 additions and 29 deletions

View File

@@ -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;
}

View File

@@ -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) {